Sun GlassFish Enterprise Server 2.1 Quick Start Guide

Setting up Load Balancing

Before you set up load balancing, you need to install the load balancer plug-in. These procedures assume you are running a domain with cluster or enterprise profile.

ProcedureTo Set Up Load Balancing

  1. Create a load balancer using the Admin Console. Alternatively, you can use the asadmin create-http-lb(1) command.

    1. Click the HTTP Load Balancers node in the Admin Console.

    2. Click New.

    3. Type lb1 as the name of the load balancer, the host on which Web Server is installed, and the Web Server instance port. In this sample scenarios Web Server host is localhost and the port is 38000.

    4. Select the Apply Changes Automatically check box. If you choose this option, you do not have to export the load balancer configuration. All changes you make to the load balancer configuration are propagated automatically.

    5. Select cluster1 as target.

      Creating a Cluster explains how to create a sample cluster (cluster1)

    6. Click Save.

  2. Enable cluster1 for load balancing:

    asadmin enable-http-lb-server cluster1

  3. Enable the clusterjsp application for load balancing:

    asadmin enable-http-lb-application clusterjsp.

See Also

For information on advanced topics, such as changing the load balancer configuration or creating health checkers, see the Chapter 4, Configuring HTTP Load Balancing, in Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.