Sun Java System Application Server Enterprise Edition 8.2 Quick Start Guide

Creating a Load Balancer Configuration

Once the load balancing plug-in is installed, create a load balancer configuration using the Application Server's asadmin command. You need a shell execution environment for this section.

ProcedureTo Create an HTTP Load Balancer Configuration

  1. Create a load balancer configuration called MyLbConfig targeted to the cluster FirstCluster:

    asadmin create-http-lb-config --target FirstCluster MyLbConfig

  2. Enable the FirstCluster cluster and the clusterjsp application deployed in it for HTTP load balancing:

    asadmin enable-http-lb-server FirstCluster

    asadmin enable-http-lb-application --name clusterjsp FirstCluster

  3. Create a health checker for the load balancer, which signals when an instance that goes down recovers.

    asadmin create-http-health-checker --interval 10 --config MyLbConfig FirstCluster

    The interval is the number of seconds the health checker waits between checks of an unhealthy instance.

  4. Export the configuration to a file loadbalancer.xml.

    asadmin export-http-lb-config --config MyLbConfig loadbalancer.xml

    Because this syntax specifies a file name but not a directory for the loadbalancer.xml file, it is created in the current working directory.

  5. Copy loadbalancer.xml to:

    web-server-install-dir/https-hostname/config/loadbalancer.xml