tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lin <>
Subject Re: Tomcat in a High Traffic Environment
Date Fri, 29 Oct 2004 15:53:24 GMT
mladen makes a good point. the sites I've worked on, we left the
keepalive up to the browser and didn't explicitly disable keepalive. 
the sites I've worked on we simply used hardware load balancer to make
sure the session goes to the right server.

that is usually enough from my experience. my bias perspective is,
unless the users are sending requests very rapidly, I don't see much
benefit to using keepalive. If the interval between requests is rather
long, like minutes, I doubt keepalive would provide any measurable

I would look at the statistics from the http logs to determine whether
keepalive should be disabled or not.


On Fri, 29 Oct 2004 17:44:09 +0200, Mladen Turk <> wrote:
> Peter Lin wrote:
> > you don't need to use keepalive.  generally, in a load balanced setup,
> > keepalive is disabled because the load balancer is already making sure
> > the user goes to the same webserver for the life time of the session.
> >
> > keepalive is usually set in the HTTP header by the client, so I don't
> > think you need to do anything to tomcat's config. someone correct me
> > if I'm wrong. remy can provide a better description of what happens in
> > the case a browser wants to use keep alive.
> >
> 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.
> MT.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message