Clustering of Java web applications is a native part of the RUN@Cloud environment. There is an area of the service that is undergoing continuous improvements, so keep an eye on this page to see the latest features evolutions.
The CloudBees Cloud includes a HTTP routing layer that handles clustering and load balancing for your web applications. When an HTTP request is received, the routing layer uses the HTTP host header to determine the target application. Once the target application is determined, the request will be forwarded to a deployed instance of the application. If your application has been configured to run in a cluster, requests are forwarded to instances. If the routing layer is unable to connect to the instance, the request will automatically be directed to the next deployed application instance.
Application Hibernation and Activation
Applications running in the CloudBees Cloud can be hibernated so they will not consume any server resources when not needed. Hibernation is a very effective way to increase the efficiency of your application servers so that you can run more applications with fewer resources. This is useful for infrequently used applications or for dev/test application deployments.
When an HTTP request for a hibernated application is received, the HTTP routing layer will automatically re-activate the application by deploying it to an available slot. The amount of time required to activate an application varies based on the size of the application's deployment package and the amount of startup logic that occurs when the application is started. A simple Java application, typically takes only a few seconds to activate, but larger applications will take longer. Currently, clients requests are blocked during application activation.
By default, applications sessions are bound to a single application instance and not enabled for clustering. For session failover , you will want to enable session clustering so that session data stored by one server will be available from other application server instances when the next request is received. To enable clustered sessions, you can create an application session store and then bind it to your application.
Storing data in databases is the most common way of storing data for clustered applications. Your applications can access a variety of database services provided as part of the CloudBees Platform and Services Ecosystem. You can also host your own databases or connect to databases hosted by third-parties.