Comments (3)
I got it. Your explanation is deeper than this faq. Cache is always a smart solution.
tks again. 👍
from hyper-express.
There is no minimal infrastructure special to uWebsocket. You can use both Express/HyperExpress on any hardware and HyperExpress/uWebsocket will beat Express in every way when it comes to pure throughput performance.
What that statement is stating is this: let's say you had a route called /users/:id that made a SELECT query to your SQL database and returned results, you will actually notice that HyperExpress/Express wil have very similar performance. This is simply an illusion because since each request makes an SQL query to your database, you are essentially stressing your database not the webserver. When he says to cache requests as much as possible, he means to implement intermittent caches. So for example, let's say you had an endpoint called /currency/consume which made a third-party API request to retrieve fresh currency data. What you would do to maximize performance is use a package like https://github.com/kartikk221/cached-lookup and put the third-party API behind a 5 second cache. This way if your server got let's say 50k requests/second, your server server will continue to serve the latest cached data from memory while fetching fresh data every 5 seconds as needed. This would make full use of the available throughput without stressing the third-party API.
from hyper-express.
cached-lookup => Of course, I will include in my PoC.
from hyper-express.
Related Issues (20)
- Static serving HOT 1
- No error on binding to the same port HOT 1
- No Socket Received From uWebsockets.js likely due to an invalid host or busy port. HOT 2
- Optional Parameter Route HOT 2
- Read JSON as raw HOT 4
- Listen on IPv6 by default HOT 1
- Client certificate validation HOT 1
- v6.15.0 introduces breaking changes with the new server.listen unix socket method HOT 1
- Get Hyper-Express to feature parity with Express HOT 2
- missing Promise return type on shutdown HOT 1
- run on aws lambda HOT 1
- Vite middleware support: Request type missing export and `.originalUrl` method & `url` setting HOT 7
- Middleware goes beyond the Router HOT 3
- hyper-express subdomains HOT 1
- Write requires await to work as in Express.js HOT 4
- Response._cork property is never reassigned HOT 1
- HyperExpress faster then uWebsockets HOT 2
- file (sendFile) without caching HOT 1
- SSE not working as expected HOT 4
- Issue in setting an API gateway HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyper-express.