GlassFish Server enables multiple GlassFish Server instances to be clustered to provide high availability through failure protection, scalability, and load balancing. The subsections that follow provide an overview of high availability clustering and load balancing for GlassFish Server. For a complete example of setting up high availability clustering and load balancing, see Deploying an Application to a Two-Instance Cluster.
A cluster is a collection of GlassFish Server instances that work together as one logical entity. A cluster provides a runtime environment for one or more Java Platform, Enterprise Edition (Java EE) applications. A cluster provides high availability through failure protection, scalability, and load balancing.
A GlassFish Server instance is a single Virtual Machine for the Java platform (Java Virtual Machine or JVM machine) on a single node in which GlassFish Server is running. A node defines the host where the GlassFish Server instance resides. The JVM machine must be compatible with the Java Platform, Enterprise Edition (Java EE).
GlassFish Server instances form the basis of an application deployment. An instance is a building block in the clustering, load balancing, and session persistence features of GlassFish Server. Each instance belongs to a single domain and has its own directory structure, configuration, and deployed applications. Every instance contains a reference to a node that defines the host where the instance resides.
For more information, see the following documentation:
Storing session state data enables the session state to be recovered after the failover of an instance in a cluster. Recovering the session state enables the session to continue without loss of information. GlassFish Server supports in-memory session replication on other servers in the cluster for maintaining HTTP session and stateful session bean data.
GlassFish Server supports web server and hardware-based load balancing for clustered configurations. A load balancer is deployed with a cluster, and provides the following features:
Allows an application or service to be scaled horizontally across multiple physical (or logical) hosts yet still present the user with a single URL
Insulates the user from host failures or server crashes when used with session persistence
Enhances security by hiding the internal network from the user
Oracle GlassFish Server includes a Load Balancer Plug-in for popular web servers such as Oracle HTTP Server, Oracle iPlanet Web Server, Apache HTTP Server, and Microsoft Windows IIS. The Load Balancer Plug-in includes a graphical Load Balancer Configurator installation wizard that makes it easy to configure the plug-in to work with your particular GlassFish Server and web server installations.
GlassFish Server load balancing configurations can vary widely depending on the needs of your enterprise. For complete information about configuring load balancing in GlassFish Server, see the following documentation: