tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: Tomcat in a High Traffic Environment
Date Sat, 30 Oct 2004 08:10:15 GMT
On Fri, 29 Oct 2004 16:39:36 -0700 (PDT), David Rees
<> wrote:
> Mladen Turk wrote:
> >
> > Yes, but the keepalive is used mainly for making the 'state' out of
> > 'stateless' protocol, and it's main advantage is that you don't need
> > to acquire a new connection all the time. Take a look at RFC2068.
> > Even apache keeps the thread open on keepalive connections (Of course
> > you have a KeepAliveTimeout).
> >
> > Without keepalive your cluster will perhaps work better in the lab,
> > but it will fail in the real-user scenario.
> This is false.  Your cluster will not break in a real-user scenario
> without Keep-Alive turned on.  There are many HTTP servers out there which
> default to Keep-Alive turned off.
> Keep-Alive is not used for keeping "state" of a stateless protocol.  Pure
> and simple, it is used to improve client-side performance when requesting
> multiple resources in a short timespan by reducing the number of TCP/IP
> connection starts and stops.  This is mostly noticable if your website
> design requires the user to download a large number of small resources to
> view a page.
> It is very common to turn off Keep-Alive or significantly reduce it's
> timeout when attempting to scale to a large number of users without
> keeping a large number of usable connections idle.  You can easily double
> the number of concurrent users handled by a server by turning off
> Keep-Alive.  The only drawback is that if your pages have a large number
> of resources to retrieve per page and your users have a high-latency
> connection to the server.

In the setup where images are served by something else, and Tomcat
only handle the (much more complex) dynamic requests, then disabling
keeapalive makes sense.

Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message