Comments (15)
If you use http1.1 or http2.0, the keep alive is automatic.
In reality we can remove it from the wrk headers, and still it will use keep alive.
An SPA is very difficult that only use 1 call to the server.
from frameworkbenchmarks.
f you use http1.1 or http2.0, the keep alive is automatic.
Yes, so what? If "keep alive" is not used, it does not matter if this feature is enabled or not.
An SPA is very difficult that only use 1 call to the server.
As a developer who has been professionally developing SPAs since 2014, I can assure you that the complexity of SPAs has no effect on requests to the backend. In SPA, more often than not, a single request to the backend is used when changing the URL. Even if the SPA doesn't use GraphQL, the frontend is still typically send one request at a time.
from frameworkbenchmarks.
Modern http favor tcp/udp connection reuse for good reason. Disabling keep alive is neither practical nor meaningful(perf test wise).
from frameworkbenchmarks.
Disabling keep alive is neither practical nor meaningful
Yes, tell that to the users who use GraphQL that they are "not modern" and instead of one query they need to use dozens of queries.
from frameworkbenchmarks.
I think that you are misunderstanding the benefits of Keep Alive.
It's the same if they only need 1 request to the server, the next request will be slower.
Remove Keep Alive is like returning 30 years in the past.
And worst if you are using SSL.
from frameworkbenchmarks.
The Keep Alive feature is used, but this is done by front-end servers, which usually run nginx, apache, etc. They handle static files, including SSL.
from frameworkbenchmarks.
Sorry, but it isn't so.
If you connect your server app via proxy with nginx, apache,... without Keep Alive. The performance will be terrible.
from frameworkbenchmarks.
@joanhey, what are you talking about? Describe a specific real-life scenario where the client is an SPA that is written in React or Angular.
From my many years of practice, all static requests are served by nginx with the "keep alive" feature enabled, and the backend receives requests only for dynamic requests. As I wrote above, probably 90% of dynamic requests do not use "keep alive".
from frameworkbenchmarks.
https://www.nginx.com/blog/http-keepalives-and-web-performance/
https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
It's the same if it's SPA or a normal app.
from frameworkbenchmarks.
@joanhey, I'm not the first time I see how you actually bring something that is not an argument in place of arguments. And now you've done it again. I know very well what "keep alive" is, why are you giving me a link to an article that describes what it is and how to enable it?
from frameworkbenchmarks.
I send you 2 articles that explain why you need to use it.
If you can't understand it, I can't give you more information.
from frameworkbenchmarks.
If you can't understand it, I can't give you more information.
Please don't be rude to me, because I can do it too and our discussion will not go in a constructive direction.
from frameworkbenchmarks.
Single Page Applications (which are very popular now) often use two web servers: one for static files, one for dynamic requests. Benchmarks are usually run for frameworks with dynamic requests, and probably in 90% of cases, such a feature as "keep alive" is not used (in particular because of use a single GraphQL query).
In a typical back-end deployment, an HTTP reverse proxy (e.g., nginx, HAProxy, Traefik) is positioned between clients and the back-end application. Whether or not HTTP KeepAlive is used between the client and the HTTP reverse proxy, it is extremely common to have HTTP KeepAlive enabled between the proxy and the back-end. This is precisely for the performance reasons you cite, namely, closing the proxy server's connection to the back-end after each front-end request would be a significant performance tax on both servers. Since this project measures the maximum throughput of back-end technologies, we specify the use of KeepAlive to be consistent with this common configuration.
(Sidebar: it's acknowledged that there are some back-end technologies that subsume the typical proxy server into the back-end itself. In this configuration, in many cases it remains marginally beneficial to enable KeepAlive to benefit scenarios where a client may make multiple requests during the keep-alive window.)
Can you elaborate on the specific architectural configuration you anticipate would be represented by testing with KeepAlive disabled?
from frameworkbenchmarks.
Whether or not HTTP KeepAlive is used between the client and the HTTP reverse proxy, it is extremely common to have HTTP KeepAlive enabled between the proxy and the back-end.
Show me the part where I deny that. When I say that 90% of SPAs requests do not use Keep Alive - that means that 10% of requests use this feature. So I'm saying that in real life Keep Alive is enabled on the frontend and backend servers. But we're talking about benchmarks on TechEmpower that completely ignore the ability of servers to work when Keep Alive is not used (regardless of whether it is enabled by the server or not). So, to simulate work without Keep Alive, we just need to ask the backend servers to close the connection after processing each request.
Can you elaborate on the specific architectural configuration you anticipate would be represented by testing with KeepAlive disabled?
wrk -H 'Connection: close' # ...
from frameworkbenchmarks.
Show me the part where I deny that.
There is no need for defensiveness, as I am not accusing you of anything. I am trying to understand the motivation for what you're requesting.
But we're talking about benchmarks on TechEmpower that completely ignore the ability of servers to work when Keep Alive is not used (regardless of whether it is enabled by the server or not).
I'll rephrase my inquiry from the previous message: Aside from purely academic curiosity, what value do you expect could be gleaned from benchmarks run with HTTP KeepAlive disabled?
What deployment architecture would such a test approximate? I have not personally deployed or seen back-end deployments where the reverse proxy and back-end are not using kept-alive connections. In other words, to my understanding, a test without HTTP KeepAlive on the back-end would not be representative of any real-world scenarios. (I'll reiterate that I understand your point that SPAs will frequently use non-KeepAlive connections to the back-end's reverse proxy, but that is an independent matter.)
As much as this project and all of the included test types are synthetic, it nevertheless is a goal that the tests serve as high-water marks of performance for real-world applications. If there is a real-world scenario where back-end servers would be receiving requests without reusing connections from the reverse proxy, perhaps others on the project could be convinced of the value of such testing.
from frameworkbenchmarks.
Related Issues (20)
- Scratch docker permutations
- Python django workload failed after updating the latest version to 4.2.1 HOT 1
- Python 2 EOL in Github Actions. HOT 2
- How to submit your own framework HOT 1
- Using http pipelining HOT 3
- New Citrine Setup Shows Lower Numbers HOT 34
- No longer accepting plaintext only frameworks / Limited number of tests mutations HOT 10
- All frameworks based on Node.js must be tested on the same docker image. HOT 8
- Round 22 Completed HOT 28
- Node & Express Thread Configuration HOT 1
- Flask five times slower in Round 21 than Round 20 HOT 1
- ASP.NET Core platform Json and Plaintext HOT 4
- Round 22 results site shows "woo" test with Racket in the language column whereas it is written in Common Lisp
- New execution mode "profiling" HOT 6
- Enhancement request: disable pg_stat_statements when running anything but validation
- PHP 8.3 update [info]
- Inconsistent composite score best score computation HOT 2
- Holiday Break HOT 8
- Where to find the exact code that was used for Round22? 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 frameworkbenchmarks.