Migration Deployment Scenarios - Stateful vs Stateless Web Applications
Stateful versus stateless web applications Stateful web applications use the container-managed HTTP session to store their state and as such require HTTP session replication to be configured on the application server. Red Hat Consulting Strategic Migration Planning Guide14 www.jboss.com JBoss offers various options for state replication. A straight-forward configuration of the clustered cache would result in replication of the state in all participating nodes. More advanced features would enable buddy replication, where nodes are joined with one or more buddies to keep a backup of their state in case of failover. This is particularly useful in large clusters where the replication of state from each node to all other nodes results in a ballooning of memory footprint and can become difficult to manage. State replication can be configured to take place either synchronously or asynchronously. The former strategy offers reliability and the latter favors performance. Stateless applications can reside on the same server as stateful applications and simply do not use the replication features. The replication includes constant overhead plus a variable portion that grows with each application state, but is independent of the number of stateless applications.