On Tue, Jan 28, 2014 at 3:54 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote:
> > Thus I will probably never have to use clustering. > > Loving your responses on this topic, Chris. I do not want to hijack this > thread, but i find this topic interesting, and your responses make it more > interesting! > > +1. Great discussion, as always :) > Honestly, I don't need clustering (yet) in my app, but I feel as though > endusers of my app will be fine in a failover situation (as you described > in this thread). Endusers of my app have to login a lot since I set session > expired = 15 minutes. no complaints from the endusers, because they are in > and out of the app...all day, (almost) every day. > Ultimately, session stickiness works great to handle load balancing (workload management), but it is not enough for session failover. In the unlikely event that the serving tomcat instance dies, the user will be sent over to the other tomcat instance (that doesn't know anything about you, i.e. doesn't have your session data), and will probably need to login again. Now, as Chris pointed out - it would be great to design your app that it saves the intermediate work to a database or some secondary store that can be retrieved upon login again. Think "shopping cart", you are shopping around, the instance goes down, you need to login again, and a nice application would persist shopping cart for you, not so nice application would not, so when logged in again - the shopping cart would be available or not :) Now, if your end users can live with that scenario - that's great - no need for session replication, clustering your instances, network chatter, etc... It definitely simplifies the configuration and setup. However, if your end users (i.e. your Service-Level-Agreement / SLA) do require a proper session failover, you will need some sort of session replication to successfully implement that feature. That's not trivial and depends on the appserver (e.g. Tomcat, JBoss, WebSphere, Weblogic). Session replication is not part of the official JEE/Servlet spec, but most modern and serious appservers would provide some way of replicating sessions and clustering appserver instances. Now, if you could make you application stateless - you could possibly turn off the sticky sessions. Makes things very easy to scale! :)) the only time I really need failover is when I 'might' want to update the > app's software. the app is quite stable now and not many software changes > right now, so again, there's not much of a need for failover. :) > Excellent! Keep it simple! Good luck! Neven