Sun GlassFish Communications Server 2.0 High Availability Administration Guide

Configuring the Converged Load Balancer

These sections describe, in more detail, how to modify and use a load balancer configuration:

Editing Load Balancer Settings in the Admin Console

After you have created a converged load balancer, you can edit its settings in the Admin Console as described in the following sections.

Editing Configuration Settings

To configure a load balancer in the Admin Console, on the left frame, click the Converged Load Balancers node and then click the desired load balancer listed under the node. Open the Settings tab. This displays the Edit Converged Load Balancer Configuration Settings page.

The following table describes the load balancer configuration settings.

Table 2–1 Load Balancer Configuration Settings

Setting 

Description 

Policy Type 

Specifies whether the load balancing algorithm is determined by HTTP Policy and SIP Policy or by a DCR file. 

HTTP Policy 

Specifies the policy to be used for routing HTTP requests. The only allowed value is round-robin, which means the load balancer cycles through the cluster's server instances in a specified order.

SIP Policy 

Specifies the policy to be used for routing SIP requests. Specifies the parameters on which a consistent hashing policy is applied to obtain the hash key. This can be a single value or comma-separated values of parameter names to hash on. If more than one parameter is specified, the concatenated values of the parameters are used for applying the consistent hashing. The default is from-tag,call-id.

Upload DCR File 

Specifies the DCR file, which stores data centric rules for both HTTP and SIP requests. By default this file is not specified. If this file is specified, the default path and name is domain-dir/cluster/config/data-centric-rules.xml. If the converged load balancer configuration that specifies the data centric rules file does not reference any cluster or stand-alone server instance, the default path and name is domain-dir/config/data-centric-rules.xml.

If this file is specified, the instructions in this file override the HTTP Policy and SIP Policy settings. For more information about this file, see The Data Centric Rules File.

If an HTTP request doesn't match any DCR file rules, a hash key is generated using the remote host and port. If a SIP request doesn't match any DCR file rules, a hash key is generated using from-tag,call-id.

Property 

Allows you to set property names and values. 

Editing Load Balancer Details

You can change converged load balancer settings after you have created the load balancer.

To edit load balancer details in the Admin Console, on the left frame, click the Converged Load Balancers node and then click the desired load balancer listed under the node. Open the Targets tab. Select Edit Load Balancer Details. This displays the Edit Load Balancer Details page.

The following table describes the load balancer details settings.

Table 2–2 Load Balancer Settings

Setting 

Description 

Automatically Apply Changes 

Specifies whether to automatically apply configuration changes to the target server instances. 

Configuration File Name 

Specifies the name of the converged load balancer's configuration file. The default path and name of the configuration file is at domain-dir/config/cluster-config, where cluster-configis the configuration repository directory specific to the cluster's configuration. By default, the name of the configuration file name is clb-name_CLB_CONFIG.xml.

Request Pool Size 

Specifies the number of request objects created and pooled by the converged load balancer's proxy. 

Send Retries 

Specifies the number of retries the proxy attempts with the remote instance when sending of data fails. 

Read Timeout 

Specifies in milliseconds how long the proxy waits for data from the client in the socket channel. 

Editing Self Load Balancing (Load Balancer Target Details)

You can change whether an Load Balancer target cluster is self-load-balancing after you have created the load balancer.

To edit Load Balancer target details in the Admin Console, on the left frame, click the Converged Load Balancers node and then click the desired load balancer listed under the node. Open the LB Targets tab. Select Edit LB Target Details. This displays the Edit LB Target Details page. This page has only one editable setting, Self Load Balancing, which you can enable or disable.


Note –

A load balancer with Self Load Balancing disabled is not supported in a production environment.


Editing Load Balancer Settings

After you have created a load balancer, you can edit its settings and the settings of its configuration using the asadmin set command.

To edit a converged load balancer setting, use the following command:


asadmin set config-name-config.availability-service.converged-load-balancer.setting

For example:


asadmin set c1-config.availability-service.converged-load-balancer.config-file=myclb.xml

asadmin set c1-config.availability-service.converged-load-balancer.auto-commit=true

asadmin set c1-config.availability-service.converged-load-balancer.converged-lb-config-name=myclb-config

To edit a converged load balancer proxy setting, use the following command:


asadmin set config-name-config.availability-service.converged-load-balancer.proxy.setting

For example:


asadmin set c1-config.availability-service.converged-load-balancer.proxy.request-pool-size=50
asadmin set c1-config.availability-service.converged-load-balancer.proxy.send-retry-count=3
asadmin set c1-config.availability-service.converged-load-balancer.proxy.read-time-out=1500

To edit a converged load balancer configuration policy setting, use the following command:


asadmin set domain.converged-lb-config.clb-config.converged-lb-policy.setting

For example:


asadmin set domain.converged-lb-configs.myclb-config.converged-lb-policy.http=round-robin

asadmin set domain.converged-lb-configs.myclb-config.converged-lb-policy.sip=from-tag,call-id

To edit the self-loadbalance setting for a cluster, use the following command:


asadmin set domain.converged-lb-config.clbcfg.converged-lb-cluster-ref.cluster.self-loadbalance=setting

For example:


asadmin set domain.converged-lb-configs.myclb-config.converged-lb-cluster-ref.clust1.self-loadbalance=true

Note –

A load balancer with Self Load Balancing disabled is not supported in a production environment.


For more information about the asadmin set command, see the Sun GlassFish Communications Server 2.0 Reference Manual.

Enabling or Disabling a Server Instance for Load Balancing

Before you stop a server instance, you should disable the instance for load balancing so that requests are failed over to another instance. To disable a server instance or cluster for load balancing, use the asadmin disable-converged-lb-server command.

For example:


asadmin disable-converged-lb-server --user admin --passwordfile pass.txt cluster1

You can use the asadmin enable-converged-lb-server command to enable a server instance or cluster for load balancing. A new instance or cluster is created with the lb-enabled option set to false by default. You need to explicitly enable an instance or cluster for load balancing.

For example:


asadmin enable-converged-lb-server --user admin --passwordfile pass.txt cluster1

For more information about the asadmin disable-converged-lb-server command and the asadmin enable-converged-lb-server, see the Sun GlassFish Communications Server 2.0 Reference Manual.

Changing the Log Message Level for the Converged Load Balancer

The default log level for converged load balancer messages is set to INFO. To change this setting, use the asadmin set command to set the javax.enterprise.system.container.clb property. For example, change the log level for c1-config to FINE as follows:


asadmin set c1-config.log-service.module-log-levels.property.clb=FINE

asadmin set c1-config.log-service.module-log-levels.property.sip=FINE