set server.max-keep-alive-requests = 100
Why is the default so low? Could this default be increased?
[core] set server.max-keep-alive-requests = 100 (fixes #2205)
median webpage in today's day and age contains 75-100 requests per page
so increasing the default server.max-keep-alive-requests in lighttpd
from 16 is more than warranted
"set server.max-keep-alive-requests = 100"
#4 Updated by Olaf-van-der-Spek almost 7 years ago
Apache has 100: http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests
If you think sensible defaults aren't good for Lighttpd, don't change it. ;)
#5 Updated by Olaf-van-der-Spek almost 7 years ago
Nginx has 100: http://wiki.nginx.org/NginxHttpCoreModule#keepalive_requests
#6 Updated by lifeofguenter over 6 years ago
it would be great if things don't get changed "just because others do it too", but maybe in a more empirical way. Keep in mind: http://redmine.lighttpd.net/wiki/lighttpd/Docs:Performance#HTTP-Keep-Alive - and nobody told Apache's default settings was good/state-of-the-art
#7 Updated by Olaf-van-der-Spek over 6 years ago
it would be great if things don't get changed "just because others do it too", but maybe in a more empirical way. Keep in mind:
I didn't request it because others do it, but Nitrox brought up Apache as an (invalid) example.
http://redmine.lighttpd.net/wiki/lighttpd/Docs:Performance#HTTP-Keep-Alive - and nobody told Apache's default settings was good/state-of-the-art
#9 Updated by stbuehler over 6 years ago
- Status changed from Need Feedback to Missing Feedback
- Target version deleted (
No good reason provided to change it - just set it yourself.
And remember: the optimum is very likely to depend on your own setup, there is no generic "best" value.
16 should be enough so that resources for one page can be loaded without reconnecting (if your site needs more files, fix it :D - or change the value)
#12 Updated by gstrauss over 1 year ago
- Status changed from Reopened to Missing Feedback
server.max-keep-alive-requests = 16 is the default, but is easily configurable.
There is no reason to change this setting until empirical evidence is presented that there is both a benefit to doing so, and that the typical use case would benefit. Hence, this ticket is being withdrawn "Missing Feedback" and will be withdrawn with the same status if this ticket is reopened without providing empirical data supporting the request. Again, this setting is easily configurable, so this is not a bug and is not broken.
Looking in Apache source control, the DEFAULT_KEEPALIVE 100 setting in include/httpd.h was inherited into the Apache 2.0 branch from Apache 1.3.9 back in 1999. Looking back further into the history of the Apache 1.3 branch, DEFAULT_KEEPALIVE was changed from 5 to 100 back in 1997, in Apache 1.2b5 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@77500 13f79535-47bb-0310-9956-ffa450edef68
For benchmarks using keep-alive, a higher setting will perform better. On the other hand, for better resource sharing on a busy site which is at or near max-connections, server.max-keep-alive-requests with a lower value is potentially fairer. The current value of 16 in lighttpd strikes a balance between allowing the usefulness of keep-alive and at the same time allowing other clients a chance to connect to a busy site serving peak max-connections.
- Subject changed from server.max-keep-alive-requests = 16 to set server.max-keep-alive-requests = 100
- Status changed from Missing Feedback to Patch Pending
- Target version set to 1.4.46
In 2014, the average number of objects per page on the top 1000 websites exceeded 100 objects per page.
The HTTP Archive Report, which collates technical information from half a million of the web’s most popular websites
101 HTTP file requests are made — up from 95 a year ago
Total Requests Per Page chart shows median website has 75-100 requests per page, and fewer than 12% of sites have <= 25 requests per page
(see slideshow near bottom of article)
Given the above, the rise of mobile (where latency is more detrimental), the rise in HTTPS (where latency is more detrimental to setting up new connections due to increased round-trips), I am going to increase the default
server.max-keep-alive-requests to 100, the same as is done in Apache and nginx. Even with caching and CDNs, many websites running lighttpd (and not setting
server.max-keep-alive-request) will benefit from a large default.
This value is of course still configurable, and admins who find different settings are better for them should use those settings.
Also available in: Atom