Auto-scalable Jelastic GlassFish Cluster in Containers
Due to the native GlassFish clustering architecture, its topology includes three node groups:
- Load Balancer - intended to process all incoming requests, sent to the cluster, and distribute them between worker nodes
- Worker Node - application server to handle the required app and web services
- Domain Administration Server (DAS) - management instance which performs centralized control of the cluster nodes and configure communication between them via SSH
Current implementation of Jelastic scalable GlassFish cluster is built on top of Docker containers. This ensures additional reliability through operating each node as an isolated instance and enables simple container update procedure. Here, the following two Docker templates are used:
Upon deploying this solution, you’ll get the already configured and ready-to-work GlassFish cluster inside the Cloud, that consists of DAS node, 2 GF application servers (workers), HAProxy load balancer and is secured by Jelastic SSL. For the detailed guidance on this JPS package installation and management, refer to the GlassFish Cluster with Automatic Load Balancing page.
GlassFish cluster package by Jelastic automatically adjusts number of Worker nodes based on current cluster load (up to 10 instances per layer) according to the following conditions:
- +1 node if RAM usage > 70% for at least 1 minute
- -1 node if RAM usage < 40% for at least 10 minute
The appropriate modifications are automatically applied to DAS and Load Balancer configs.
In case you’d like to change the conditions of automatic nodes’ scaling manually, refer to the appropriate triggers’ parameters within the Automatic Horizontal Scaling settings section.
To instantly host your own scalable GF cluster, click the Deploy to Jelastic button below. Within the opened frame, specify your email address, choose one of the Jelastic Public Cloud providers and press Install.
If working within Jelastic Private Cloud, copy link to the manifest.jps file above and import it to the required Jelastic installation.
Subsequently, in order to access cluster Domain Administration Server control panel, you’ll need to add the :4848 port to the DAS container link (or just click the Admin Console URL within the received email notification).
Also, you can check your GlassFish cluster operability with the automatically deployed test application. For that, add the /clusterjsp suffix to the end of your environment domain name in address bar. Upon refreshing the opened page, you’ll see the Server IP address and domain being constantly changed - this means the corresponding Worker Nodes are up and load balancing inside the cluster works properly.

