Mobile app version of vmapp.org
Login or Join
Murray155

: Apache KeepAlive - why should I ever need it? I've read several blogs about turning KeepAlive off in apache. When I had it turned on, and a spike in traffic, people started timing out, or

@Murray155

Posted in: #Apache #Keepalive #Server

I've read several blogs about turning KeepAlive off in apache. When I had it turned on, and a spike in traffic, people started timing out, or had to wait +10 seconds for a page load. However, when I turned it off, requests finished almost immediately.

I know HOW KeepAlive functions, and what it does, I just want to know why I would ever need it. If i'm using CSS sprites and combining all my javascript into 1 file, with only 2-3 http requests to the server, is it safe to have it turned off?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

1 Comments

Sorted by latest first Latest Oldest Best

 

@Michele947

If you can provide your resources very quickly, then a very short KeepAlive timeout should be the way to go, or use no KeepAlive at all.

KeepAlive is important when you are going to have many requests from the same client, but it gets to be a problem if you need to serve to many clients at the same time. KeepAlive with SSL is even more important as the cost to setup a new SSL connection is very high, especially if it is only for a small amount of data.

If you can serve up what you need in only 2-3 request, I'd suggest keeping it short enough to get those requests handled. If that is still not working and other users are hanging for a long time, then you probably need to consider some load balancing and a proxy.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme