- Create a load balancer configuration using the Admin Console
or the asadmin command
create-http-lb-config. In the Admin Console, on the left
frame, click HTTP Load Balancers and then click New. In the New HTTP
Load Balancer page, provide
the device details and select the target cluster or instances.
- Add a reference to a cluster or a stand-alone server instance
for the
load balancer to manage. To do this using the Admin Console, on the
left frame, click the HTTP Load Balancers node and then select the
desired load balancer listed under the node. Open the Targets tab,
click Manage Targets and in the Manage Targets page, select the
required target.
You can also do this using asadmin create-http-lb-ref.
If you created the load balancer configuration with a target,
and that target
is the only cluster or stand-alone server instance that the load
balancer references, skip
this step.
- Enable the cluster or stand-alone server instance referenced
by the load balancer. To
enable a stand-alone server instance using the Admin Console, on the
left frame,
click the HTTP Load Balancers node and then select the desired load
balancer
listed under the node. Open the Targets tab and in the Targets table,
select the check box next to the instance that you want to enable
and click Enable.
To enable a server instance in a cluster, select the load
balancer as
explained above and in the Targets tab, click the desired cluster. Now
open
the Instances tab, select the desired instance, and from the Load
Balancer Actions
drop–down list, select Enable Load Balancing.
The equivalent command to enable a cluster or a stand-alone
instance is
asadmin enable-http-lb-server.
- Enable applications for load balancing. To do this using the
Admin Console, open
the Targets tab as mentioned above and click the required cluster. Open
the
Applications tab, select the required application, and from the More
Actions drop-down list,
select Load Balancer Enable. You can also do this using asadmin
enable-http-lb-application.
These applications must already be deployed and enabled for use
on the clusters
or stand-alone instances that the load balancer references. Enabling
for load balancing is
a separate step from enabling them for use.
- Create a health checker. To do this using the Admin Console,
open the
Targets tab for the load balancer as mentioned in the previous step and
in the Targets table, click Edit Health Checker. You can also create a
health checker by using asadmin create-health-checker.
The health checker monitors unhealthy server instances so that
when they become healthy
again, the load balancer can send new requests to them.
- Generate the load balancer configuration file. To do this
using the Admin Console,
click the load balancer and then open the Export tab. In this tab,
click Export Now. You can also generate a load balancer configuration
file using
asadmin export-http-lb-config .
This command generates a configuration file to use with the load
balancer plug-in.
- Copy the load balancer configuration file to your web server config
directory where
the load balancer plug-in configuration files are stored.
Note - If you are using Sun Java System Web Server (6.1
or 7.0), and
if it is configured in the SSL mode, instead of doing steps
6 and 7 listed above, you can generate the load balancer configuration
file and
send the data 'over the wire' to the Web Server in a
single step. To do this using the Admin Console, click the desired load
balancer and then open the Export tab. In this tab, click Apply Changes
Now. This sends the data to the Web Server configuration directory.