You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Darren Kukulka <Da...@connaught.plc.uk> on 2010/07/22 16:19:55 UTC

Cluster session failover question

Hi Tomcatters,

 

Just a quick question regarding Apache Web Server load balancing down to
Tomcat cluster.

 

We have a number of 2-node Tomcat 6.0.20 clusters, all configured as
peer to peer pairs, on the same subnet with no real network oddities
mesh getting in the way to speak of.

 

Apache Mod_jk is used to balance connections from users down to the
Tomcat clusters, using the availability ('B') load balancing method,
with sticky sessions on.

 

There are situations where we need to restart either of the nodes to
affect a change...or use Probe to bring a single application down/up for
the same purpose on a single node.

 

When we do this sometimes, users report that their sessions are
lost...and they cannot re-establish a new connection, unless they
refresh their browsers (no proxy configuration getting involved here),
even if the node/app is back up.

 

Another, more difficult scenario, is when one of the Tomcat cluster
nodes begins to groan and become unresponsive, say when OldGen or
PermGen becomes full...in this case the mod_jk connector does not
identify the node as having failed and will continue to attempt to pass
requests to it, rather than pass them to the more responsive node.

 

Are there any configuration settings to be mindful of with these
scenarios?

 

Cheers,

Darren.



Connaught plc is a FTSE 250 company. We are the UK's leading provider of integrated services operating in the compliance, environmental, social housing and public sector markets.

Please visit our website to see a full list of Connaught's Registered Companies www.connaught.plc.uk/group/aboutconnaught/registeredcompanies

Disclaimer:
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546

Re: Cluster session failover question

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.07.2010 16:19, Darren Kukulka wrote:
> Hi Tomcatters,
>
>
>
> Just a quick question regarding Apache Web Server load balancing down to
> Tomcat cluster.
>
>
>
> We have a number of 2-node Tomcat 6.0.20 clusters, all configured as
> peer to peer pairs, on the same subnet with no real network oddities
> mesh getting in the way to speak of.
>
>
>
> Apache Mod_jk is used to balance connections from users down to the
> Tomcat clusters, using the availability ('B') load balancing method,
> with sticky sessions on.
>
>
>
> There are situations where we need to restart either of the nodes to
> affect a change...or use Probe to bring a single application down/up for
> the same purpose on a single node.
>
>
>
> When we do this sometimes, users report that their sessions are
> lost...and they cannot re-establish a new connection, unless they
> refresh their browsers (no proxy configuration getting involved here),
> even if the node/app is back up.
>
>
>
> Another, more difficult scenario, is when one of the Tomcat cluster
> nodes begins to groan and become unresponsive, say when OldGen or
> PermGen becomes full...in this case the mod_jk connector does not
> identify the node as having failed and will continue to attempt to pass
> requests to it, rather than pass them to the more responsive node.
>
>
>
> Are there any configuration settings to be mindful of with these
> scenarios?

Concerning the mod_jk configuration, grabbing a source tarball for 
mod_jk 1.2.30 and looking at the contained example configuration is a 
good start. Details can then be found at

http://tomcat.apache.org/connectors-doc/

especially in the "Reference Guide".

Versions before 1.2.30 do not contain a good example config, so grab the 
latest.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Cluster session failover question

Posted by Jon Brisbin <jo...@npcinternational.com>.
On Jul 22, 2010, at 9:19 AM, Darren Kukulka wrote:

> Another, more difficult scenario, is when one of the Tomcat cluster
> nodes begins to groan and become unresponsive, say when OldGen or
> PermGen becomes full...in this case the mod_jk connector does not
> identify the node as having failed and will continue to attempt to pass
> requests to it, rather than pass them to the more responsive node.

We had this problem often. mod_proxy_ajp seems to suffer from the same malady. I got fed up with it and wrote my own session manager and switched to using HAProxy. HAProxy will let you use a URL as a health checker.

My article on using HAProxy rather than mod_jk/mod_proxy_ajp:
http://www.tomcatexpert.com/blog/2010/07/12/trick-my-proxy-front-tomcat-haproxy-instead-apache

Jon Brisbin
Portal Webmaster
NPC International, Inc.

> 
> 
> 
> Are there any configuration settings to be mindful of with these
> scenarios?
> 
> 
> 
> Cheers,
> 
> Darren.
> 
> 
> 
> Connaught plc is a FTSE 250 company. We are the UK's leading provider of integrated services operating in the compliance, environmental, social housing and public sector markets.
> 
> Please visit our website to see a full list of Connaught's Registered Companies www.connaught.plc.uk/group/aboutconnaught/registeredcompanies
> 
> Disclaimer:
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org