2 ms·
Would you mind expanding a bit on keep-alive settings? In what cases would you want to set it to a low value? Question 2. As a web developer, should I be wor
by tocomment 19y ago
Would you mind expanding a bit on keep-alive settings? In what cases would you want to set it to a low value?
Question 2. As a web developer, should I be worried that I don't know as much as you about scaling a web app? What will I do when my web app makes it big?
- tocomment 19y agoI should have definately posted these questions in his blog's comments. I don't think he's coming back :-(
- mmaunder 19y agoSorry, I've been on the road - I'm busy driving from Denver to Seattle (currently in a hotel in Bozeman). I've replied to a bunch of questions and will check back again later today. Mark.
- epi0Bauqu 19y agoKeepAlive dedicates a process to one client until the KeepAliveTimeout. If you have 150 MaxClients and your KeepAliveTimeout is 5 sec, and you get 150 clients in one sec, you can't serve another for 5 more seconds. Ditching KeepAlive gets rid of this problem. So you want to lower it basically if you have a lot of different clients coming at the same time. On the other hand, if you have a few clients and they each make a lot of requests in a short amount of time, KeepAlive can save some time and resources. In answer to your other question, I wouldn't worry too much about this stuff until you need to. When that happens, there are a lot of good resources on the Web, and you can post here and I'm sure people will help you. If not, contact me, and I'll do the best I can :) Here are some further explanations about KeepAlive: http://virtualthreads.blogspot.com/2006/01/tuning-apache-part-1.html http://virtualthreads.blogspot.com/2006/01/tuning-apache-par... and http://www.perlcode.org/tutorials/apache/tuning.html http://www.perlcode.org/tutorials/apache/tuning.html
- mmaunder 19y agoJust a quick comment. I had keepalive turned on for my webserver but set to a low timeout value of 2 seconds. The server is getting a lot of traffic this morning and was approaching maxclients. I had a few reports of pages or images not loading which suggested that the server was occasionally out of connections. I just turned off keepalive completely and wow! I've basically doubled (or more) the amount of traffic I can handle. The down-side is that browsers need top open a new connection for every page component they load. But things will load more reliably now and I can handle more traffic. I have a new server ordered which comes online today with lots more memory. When I deploy that I'll probably try turning it back on to make loading faster for my users. Then when things get hairy again I'll turn it off. Come to think of it it'd be nice if I could do that without rebooting apache based on server load. Mark.