Payara Micro Cluster
The JPS package initially deploys one container with Payara Micro application server.
When application server cluster scales out new containers join the cluster automatically. When it scales in the cluster removes deleted containers automatically. Underlying clustering mechanism is based on Hazelcast.
Each container with Payara Micro application server can be scaled vertically by increasing the total RAM limits for the container. By default, optimal memory configs will be applied to JVM according to the available RAM. You can redefine default configs with environment variables such as XMX, XMS, XMN, MAXPERSIZE, XMAXF, XMINF, GC or directly adjust the memory configs script.
The package injects Jelastic GC Agent that helps to scale JVM vertically automatically by forcing memory heap compaction periodically (by default, each 300 seconds). As a result the application consumes less RAM during idle time.
<img src="https://drive.google.com/uc?export=view&id=0BwJfg6h8bVzUVDNyWkh1aTZ3OGM" alt="JVM Automatic Vertical Scaling" align="left" width="500" >
This approach helps to save money and not to pay for unused resources. More details about the benefits of this technology can be found in the article The Only PaaS with Automatic Vertical Scaling for Containers.
Please note, Full GC is used by the agent. If it significantly influences performance of your application then you can easily disable the agent injection by defining environment variable VERT_SCALING=false.
In order to get this solution instantly deployed, click the "Get It Hosted Now" button, specify your email address within the widget, choose one of the Jelastic Public Cloud providers and press Install.
More information about Jelastic JPS package and about installation widget for your website can be found in the Jelastic JPS Application Package reference.