The Application Server provides a load balancer plugin that can balance the load of requests among multiple instances which are part of the cluster. For more information on configuring the load balancer, see Configuring the Load Balancer in Sun Java System Application Server Enterprise Edition 8.2 High Availability Administration Guide.
The following section assumes that the server is tuned effectively to service incoming requests.
The load balancer periodically checks all the configured Application Server instances that are marked as unhealthy, based on the values specified in the health-checker element in the loadbalancer.xml file. Enabling the health checker is optional. If the health checker is not enabled, periodic health check of unhealthy instances is not performed.
The load balancer’s health check mechanism communicates with the application server instance using HTTP. The health checker sends an HTTP request to the URL specified and waits for a response. The status code in the HTTP response header should be between 100 and 500 to consider the instance to be healthy.
To enable the health checker, edit the following properties:
url: Specifies the listener’s URL that the load balancer checks to determine its state of health.
interval-in-seconds: Specifies the interval at which health checks of instances occur. The default is 30 seconds.
timeout-in-seconds: Specifies the timeout interval within which a response must be obtained for a listener to be considered healthy. The default is 10 seconds.
If the typical response from the server takes n seconds and under peak load takes m seconds, then set the timeout-in-seconds property to m + n, as follows:
<health-checker url="http://hostname.domain:port" interval-in-seconds="n" timeout-in-seconds="m+n"/>