users@glassfish.java.net

Re: how to tune keep alive for a stateless webapp deployed to a cluster?

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 07 Jul 2009 13:35:20 -0400

Hi,

glassfish_at_javadesktop.org wrote:
> Hi All,
>
> I am looking for some advice with respect to tuning the glassfish v2 keep alive subsystem.
>
> We have a webapp that is completely stateless (ie. no http session at all). It is deployed to a multi instance cluster, and we are using apache mod_proxy_balancer to balance requests.
>
> In this case, my feeling is that keep alive should be turned off. Since there is no session stickyness, I am assuming that apache will send subsequent requests to different instances every time (especially if keep alive is disabled in apache also).
>
> So the question is, would having no keep alive be the best case for us, and if so, is it even possible to do this in glassfish v2? If not, then what should be the best tuning parameters otherwise?

You should keep keep-alive IMO independently of your application. The
connection will stay open so mod_proxy will not have to re-open one
after every request. A connection can be used for many request. By
default, GlassFish allow 250 requests to be processed and then close the
connection by adding the Connection: Close header. Connection are also
closed if they stay open for more than 30 seconds without activities
(request).

Hope that help.

-- Jeanfrancois



>
> Thanks,
> Jesse.
> [Message sent by forum member 'nzjess' (nzjess)]
>
> http://forums.java.net/jive/thread.jspa?messageID=354363
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>