Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (1536 KB)
Creating the HTTP Health CheckerThe load balancer’s health checker periodically checks all the configured Application Server instances that are marked as unhealthy. A health checker is not required, but if no health checker exists, or if the health checker is disabled, the periodic health check of unhealthy instances is not performed. The load balancer will not be able to determine when an unhealthy instance becomes healthy. 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. A status code in the HTTP response header between 100 and 500 means the instance is healthy. Note – If you have a deployment scenario where the load balancer is the front–end for a cluster that has instances using a secured port with client certificate authentication enabled, the health checker will not be able to perform a health check of the instances. Hence, those instances will always be marked unhealthy and no requests will be sent to them. Creating a Health CheckerTo specify the health checker properties, you can use the Admin Console or the asadmin create-http-health-checker command. To do this in the Admin Console, navigate to the HTTP Load Balancers node, expand it and select the load balancer. Then, open the Target tab, and in the Targets table, click the Edit Health Checker link for the desired target. Specify the following parameters. Table 5–2 Health Checker Parameters
If an application server instance is marked as unhealthy, the health checker polls the unhealthy instances to determine if the instance has become healthy. The health checker uses the specified URL to check all unhealthy application server instances to determine if they have returned to the healthy state. If the health checker finds that an unhealthy instance has become healthy, that instance is added to the list of healthy instances. For more information about the commands, see create-http-health-checker(1) and delete-http-health-checker(1). Additional Health Check Properties for Healthy InstancesThe health checker created by create-http-health-checker only checks unhealthy instances. To periodically check healthy instances, set some additional properties in your exported loadbalancer.xml file. Note – These properties can only be set by manually editing loadbalancer.xml after you’ve exported it. There is no equivalent asadmin command to use. To check healthy instances, set the following properties. Table 5–3 Health-checker Manual Properties
Set the properties by editing the loadbalancer.xml file. For example: <property name="active-healthcheck-enabled" value="true"/> <property name="number-healthcheck-retries" value="3"/> If you add these properties, then subsequently edit and export the loadbalancer.xml file again, the newly exported configuration won’t contain these properties. You must add these properties again to the newly exported configuration. |
||||||||||||||||||||||||