You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Linus Brimstedt <li...@viskan.se> on 2015/04/07 22:46:08 UTC

Problem with SimpleTcpCluster and nodes temporarily dropping out of cluster

Hello,

We have a problem with SimpleTcpCluster and session replication.
We have tested this in Tomcat 7 and 8 (latest versions) on Windows Server
using latest revision of Hotspot JDK version 7, but checking the code it
seems like this is not covered anyway.

The problem:
Replication works well when servers start up, they get missing sessions and
new sessions are replicated to all servers.
If one server temporarily drops out of the cluster, for example because it
gets unresponsive during deployment of new application, the sessions
created during this time are not replicated.

We remove servers from load balancer several times a day to upgrade
different applications, so this has become a big problem for us.

Once the server joins the cluster again, new sessions are replicated
properly. Only sessions created during the unresponsive window are lost.


I see two solutions:
1) Switch to a different session sharing  setup (redis, memcached, or
similar). We would like to avoid this if possible, to avoid maintaining
more services.

2) Improve SimpleTcpCluster to resend lost sessions.
We had a brief look at the code and realize it's a bit of work. Before we
dig deeper into this, it'd be good to see if someone has any thoughts on
this, other suggestions or ideas to remedy the situation.

best regards
/Linus


-- 

*Linus Brimstedt *
CTO
+46 70 - 683 98 54
linus.brimstedt@viskan.se

*Viskan Distanshandel System AB*
Druveforsvägen 8
504 33 Borås, Sweden
+46 33 - 20 60 20
www.viskan.se

Re: Problem with SimpleTcpCluster and nodes temporarily dropping out of cluster

Posted by Linus Brimstedt <li...@viskan.se>.
Hi!

Thanks for your reply!
We have evaluated backupmanager and it does indeed seem to solve the issue!

br
/Linus

On 8 April 2015 at 12:30, Mark Thomas <ma...@apache.org> wrote:

> On 07/04/2015 21:46, Linus Brimstedt wrote:
> > Hello,
> >
> > We have a problem with SimpleTcpCluster and session replication.
> > We have tested this in Tomcat 7 and 8 (latest versions) on Windows Server
> > using latest revision of Hotspot JDK version 7, but checking the code it
> > seems like this is not covered anyway.
> >
> > The problem:
> > Replication works well when servers start up, they get missing sessions
> and
> > new sessions are replicated to all servers.
> > If one server temporarily drops out of the cluster, for example because
> it
> > gets unresponsive during deployment of new application, the sessions
> > created during this time are not replicated.
> >
> > We remove servers from load balancer several times a day to upgrade
> > different applications, so this has become a big problem for us.
> >
> > Once the server joins the cluster again, new sessions are replicated
> > properly. Only sessions created during the unresponsive window are lost.
> >
> >
> > I see two solutions:
> > 1) Switch to a different session sharing  setup (redis, memcached, or
> > similar). We would like to avoid this if possible, to avoid maintaining
> > more services.
> >
> > 2) Improve SimpleTcpCluster to resend lost sessions.
> > We had a brief look at the code and realize it's a bit of work. Before we
> > dig deeper into this, it'd be good to see if someone has any thoughts on
> > this, other suggestions or ideas to remedy the situation.
>
> 1. Use the BackupManager rather than the DeltaManager. It also scales
> better.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 

*Linus Brimstedt *
CTO
+46 70 - 683 98 54
linus.brimstedt@viskan.se

*Viskan Distanshandel System AB*
Druveforsvägen 8
504 33 Borås, Sweden
+46 33 - 20 60 20
www.viskan.se

Re: Problem with SimpleTcpCluster and nodes temporarily dropping out of cluster

Posted by Mark Thomas <ma...@apache.org>.
On 07/04/2015 21:46, Linus Brimstedt wrote:
> Hello,
> 
> We have a problem with SimpleTcpCluster and session replication.
> We have tested this in Tomcat 7 and 8 (latest versions) on Windows Server
> using latest revision of Hotspot JDK version 7, but checking the code it
> seems like this is not covered anyway.
> 
> The problem:
> Replication works well when servers start up, they get missing sessions and
> new sessions are replicated to all servers.
> If one server temporarily drops out of the cluster, for example because it
> gets unresponsive during deployment of new application, the sessions
> created during this time are not replicated.
> 
> We remove servers from load balancer several times a day to upgrade
> different applications, so this has become a big problem for us.
> 
> Once the server joins the cluster again, new sessions are replicated
> properly. Only sessions created during the unresponsive window are lost.
> 
> 
> I see two solutions:
> 1) Switch to a different session sharing  setup (redis, memcached, or
> similar). We would like to avoid this if possible, to avoid maintaining
> more services.
> 
> 2) Improve SimpleTcpCluster to resend lost sessions.
> We had a brief look at the code and realize it's a bit of work. Before we
> dig deeper into this, it'd be good to see if someone has any thoughts on
> this, other suggestions or ideas to remedy the situation.

1. Use the BackupManager rather than the DeltaManager. It also scales
better.

Mark


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