hyper-express
cached-lookup
Our great sponsors
hyper-express | cached-lookup | |
---|---|---|
38 | 17 | |
1,431 | 56 | |
- | - | |
8.8 | 5.1 | |
17 days ago | 8 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
hyper-express
- HyperExpress: High Performance Node.js Webserver
- HyperExpress – High-perf HTTP/ws server (~20x Express.js)
-
I have done a full benchmark of a POST REST API on my computer: Node.js vs Fastify vs Express.js vs Deno vs Bun vs GO. Node.js is used WITH and WITHOUT clustering on 6-core I7 processor
Hey, I believe uWebsockets.js does support clustering. I'm the author of https://github.com/kartikk221/hyper-express which is written on top of uWebsockets.js and is pretty much the fastest webserver in Node land with an Express-like API and all of the common features such as middlewares, Router, async/sync, Websockets, Server Sent Events, File Uploading in a single package that is about same size as Express. The only catch is that you lose about 14% performance from the uWebsockets.js peak because of all the features but this is being improved and a well worth trade off for the familiar developer experience with still almost 2.5x performance of Fastify and other similar frameworks.
- HyperExpress – High Performance Node.js Webserver
- HyperExpress – Simple, performant HTTP/WebSocket server using uWebSockets.js
- Simple, Performant HTTP and WebSocket Server Using Uwebsockets.js
-
MRSK: Deploy Web Apps Anywhere
Yeah I’m personally of the opinion that the performance loss for regular web services is worth it 99% of the time. RAM is cheap, human time is not.
That said I definitely believe your characterization of resource hunger between nginx and traefik.
You are the second person to mention using websockets for requests in as many days… How do you deal with scale out? Sticky cookie routing seems like almost a requirement if you don’t want to deploy a redis-alike.
Also just out of curiosity, do you use hyper-express[0]?
[0]: https://github.com/kartikk221/hyper-express
-
What are some good projects for learning about buffers, event emitters, and streams in NodeJS?
Building your own webserver on top of a lower level networking library in Node.js can be a good way to learn all 3 of those things. I have built a webserver called HyperExpress which is essentially a layer on top of a low level C++ websever called uWebsockets and I had to utilize and progress my knowledge in buffers, emitters and streams to achieve the same API as Express.js and make it usable for Node.js applications: https://github.com/kartikk221/hyper-express Feel free to dig around in the code and make any PRs for improvements!
-
What are the performance overheads of V8 Engine
You can check out source code here if you’d like to do more digging https://github.com/kartikk221/hyper-express
-
Need help in understanding why we need classes in JS(node specifically).
Are classes absolutely needed in JS? No, not really. Are classes really nice and significantly improve the readability/flow of your code in some cases? Sure, an example could be a webserver I wrote: https://github.com/kartikk221/hyper-express
cached-lookup
-
How to queue requests in nodejs to gain a huge performance boost
I wrote a package which does just this but with any upstream source including even heavy synchronous operations. It's versatile and can accept / cache across different arguments with various consumption methods which in your case would result in different queueing / latencies https://github.com/kartikk221/cached-lookup
-
Facing rate limit issue
The easiest solution would be to implement caching and to do so you can simply use the following package: https://github.com/kartikk221/cached-lookup
-
LevelTwo: In-process cache for asynchronous data fetching to enable instantaneous results
I wrote a similar package called https://github.com/kartikk221/cached-lookup althought it seems that LevelTwo is much more intricate and provides synchronization of cache across machines?
-
Is caching very important for web services?
Luckily, caching doesn't have to be hard. Easily add https://github.com/kartikk221/cached-lookup to your code and you will have a simple in memory cache. With this package, you won't have to worry about memory or performance as it handles both automatically. Furthermore, it is unopinionated meaning it can be used for anything and everything.
- CachedLookup 4.0.0: Now With Intermittent Caching For Multiple Sets Of Arguments!
-
How do I handle 1000 concurrent users?
Simply add a https://github.com/kartikk221/cached-lookup on the endpoint with a 1-second cache which serves the JSON from Redis and you should be able to serve wayy more than 1k concurrent users. If you still somehow hit a limit, look into using a higher throughput web-server like https://github.com/kartikk221/hyper-express
-
Locks in JS, because why not?
Your description exactly describes a caching package I wrote https://github.com/kartikk221/cached-lookup so I am a bit more interested in the problem you are proposing above as I have been using this in my own production microservices and never had the problem above occur.
-
How to implement caching for every 24 hourse
Implement a CRON Job which fetches a fresh result from the API and stores it in Redis then use https://github.com/kartikk221/cached-lookup to create a lookup instance which will serve the cached data from your Redis database every some amount of seconds. This way you will be able to serve thousands of requests while your Redis database will only receive one request every few seconds as you specify.
-
CachedLookup 3.0.0: A Simple Package To Cache And Save On Expensive Lookups & Operations. Now With TypeScript Support.
I have raised a PR to add correct support for it. https://github.com/kartikk221/cached-lookup/pull/1
What are some alternatives?
nanoexpress - Professional backend framework for Node.js
iron-session - 🛠 Secure, stateless, and cookie-based session library for JavaScript
Socket.io - Realtime application framework (Node.JS server)
bun - Bun JS app doing basically nothing
Express - Fast, unopinionated, minimalist web framework for node.
µWebSockets - Simple, secure & standards compliant web server for the most demanding of applications
just - the only javascript runtime to hit no.1 on techempower :fire:
hpagent - A ready to use http and https agent for working with proxies that keeps connections alive!
uWebSockets.js - μWebSockets for Node.js back-ends :metal:
transport-site - Rendre disponible, valoriser et améliorer les données transports
bun - A fast all-in-one JavaScript runtime [Moved to: https://github.com/oven-sh/bun]
desktop - Building native-like Elixir apps for Windows, MacOS, Linux, iOS and Android using Phoenix LiveView!