tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Brisbin <...@jbrisbin.com>
Subject Non-tribes based clustering in TC6
Date Mon, 15 Feb 2010 00:46:30 GMT
Hi all,

I'm relatively new to Tomcat 6 clustering and we have a VMware-based cloud architecture with
a few Ubuntu Linux boxes running three instances each of tcServer (Tomcat 6.0.20) with SimpleTcpCluster
configured to replicate with channelSendOptions=6 and no sticky sessions. I don't want to
use sticky sessions because I want the user load spread equally across all Tomcat nodes. Each
Linux VM has an Apache/mod_proxy_ajp configuration that proxies all the other backends.

SimpleTcpCluster works okay for a while but seems to break continually after a certain amount
of time. Replication of session data errors out, which seems to snowball errors throughout
the cluster. It never recovers from these errors and stays in an error state until I restart
it. Since several Apache proxy_ajp instances are proxying all these backend servers, I basically
need a setup where, when a user session is created, it is persisted to a central database
and when subsequent requests go to different Tomcat instances, that session data is available
to it via this central DBMS. I don't want a multicast/Tribes-based approach because it frankly
doesn't work very well and I don't like getting woken up at 12:30 in the morning because our
production systems aren't accessible because the clustering has failed and rendered the web
applications inaccessible.

I'm so fed up with the Tribes-based clustering, I've simply determined to write my own DBMS-backed
replacement. Our cloud architecture depends on a "master" node to facilitate cluster communication,
so I'm not at all concerned with depending on this server to be up. I'm not launching space
shuttles here, I just want a system that actually works reliably without sticky sessions and
that can be left alone for more than 2 days at a time.

What I'd like some help with is figuring out what is the absolute minimum functionality to
make this type of clustering work? 

When a new Session is created, I would basically write a record to a database. I would assume
I'd need to encode/serialize an object into the DB. When that user hits another Tomcat instance,
the clustering machinery needs to load that object from the DB and make it look like that
user has a session in that Tomcat instance. I don't want to track dirty sessions, I want to
write everything to the DB backend. There's no failover or anything here because all sessions
are always available on all nodes in the cluster on every page request. There's no "replication"
because the sessions are always DB-backed. There's never a time when session data exists in
a Tomcat instance's heap in isolation from the other servers.

Will this approach work without a lot of overhead? I'm not looking to provide anything more
than the bare minimum of functionality to begin with. I just don't have time to muck about
with SimpleTcpCluster any more. 

Thanks!

J. Brisbin
http://jbrisbin.com/







Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message