tomcat - Clustering a Java EE Web app - Options? -


I have a web app that is stationed on Apache, Tomcat and three servers running a load balancer in front of them. Now I am thinking of clustering them.

Here are the general options and my barriers I know about:

  1. Serialization based session clustering: In my case, in the session session, many objects Uses. So I do not like to go with this solution. Furthermore, in the near future there is not much increase in the number of servers.

  2. Terracotta: Interesting but there is no alternative to buying enterprise licenses.

  3. Make the app stateless: looks enticing, though it is a little bit of a task.

Any other advice?

My primary goal is failover.

If you intend to use clustering, then the individual user session avoids the loss of a server, then you will need to pay some type of transfer cost. You might:

  • Put everything in a database, maybe sorted as a blob. When the session expires, you need those home-based blops that have the capability in app servers such as WebSphere.
  • Use any kind of memory-memory replication, then some transit / serialization costs are going to happen. You can trade the frequency of that replication against the possibility of the loss of recent updates in the session.

In either case, you have a purpose for "session relation": the user's default request is the same cluster member, as a "write-cash" example of their "home" example works.

I do not know what the off-the-shelf has been provided in your environment, ideally the session management of your server provider built-in features - your self is not completely despised if this stuff is written is.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -