The main objective of a highly available system is tominimize downtime. As a brand new major release, and the only Java EE 7 application server currently available, does GlassFish 4.0 provide you with what you need from a reliable server?
The Domain Admin Server (DAS) manages the clusterand provides a graphical admin console to create configure server instances.Physical machines are called Nodes and the DAS is, as you might guess, on theAdministration Node, which can also host other cluster instances. GlassFish clustersscale up by adding more instances to nodes and out by adding more nodes.
If the objective for a highly available system is to accept that unplanned failures and downtime happen and mitigate the impact, then part of that impact is the loss of session data for your customers.
Since, as I’ve mentioned, clustering in 4.0 is officially only an early access feature, the alternative to native session data management is to store your sessions in a distributed cache, like Ehcache or Memcached.
Taking advantage of the high availability features of a distributed cache means that you no longer have to worry about managing your session data, since it’s always available in the cache.
Early access feature or not, GlassFish 4 clusters still provide session persistence through failover of distributed HTTP session data and stateful session bean data.
This failover is accomplished by in-memory session replication with clustered server instances, so if you are using session persistence with a load balancer, you'll need to enable sticky sessions (session affinity) to make sure no data is lost or sent to the wrong server. One such load balancer that can be configured like this is the GlassFish Loadbalancer plug-in...
Your web server can then be configured to forward AJP requests, commonly with Apache and mod_proxy, which is bundled with the web server, or mod_jk.