My understanding is that you are currently load balancing your load on 3 servers, so, to me, you are already doing clustering (the scalability part) and I'm not sure what you exactly mean by "clustering them". Do you mean going beyond with transparent fail over?
Serialization based Session clustering: In my case, the application uses a lot of objects in session. So I would prefer not to go with this solution. Also the no of servers is likely increase to more then five in the near future.
This is only useful if you if you don't want your users to loose their session if one instance falls. If you really want this, you'll need "persistent session" (but be aware that this has a performance cost), Tomcat offers several way to implement this:
- using session persistence and saving the session to a shared file system,
- using session persistence and saving the session to a shared database,
- using in-memory replication.
This would require some real bench but, personally, in-memory replication is my preferred solution (best performances). Avoid serializing to database at any cost (bad performances from my experience).
Terracotta: Sounds interesting but buying an enterprise license is not an option.
I guess you are referring to their JVM-level clustering solution here. Clustering the JVM underneath the application (vs clustering the application itself) is IMHO a solution when the application can't be easily clustered? But why would you do this with an application server that is offering such a feature?
Make the application stateless: Sounds tempting although it is a bit of a work. I would love to hear some design guidelines and experiences on it.
Do you mean not using the HTTPSession
? If yes, why? what problem are you facing with HTTPSession
? Why would you do this?
To be honest, what you are trying to achieve is not clear to me. You already have a scalable solution (vertically and horizontally), no single point of failure (except the load balancer but well...), and very few applications (e.g. life critical applications, financial applications) really need transparent fault-tolerance (in other words, many can live without). Moreover, transparent fault-tolerance has a real cost in terms of performance and/or hardware that shouldn't be neglected. So, the real questions are: does your enterprise loose that much money when a user looses his session? Is it that critical/frequent? Does this justify spending money to implement transparent fault-tolerance?