12.7. Load Balancer

Argument Definition
--responsetimeout
timeout interval in seconds within which a response must be received from the application server. If the request is configured as idempotent, it will be retried, else the error page will be returned. Default value is 60.
--httpsrouting
determines whether the load balancer should route the incoming HTTPS request as HTTPS request to the instance.  Default value is false.
--reloadinterval
reload pool interval in seconds at which load balancer has changed.  If it has change, load balancer would reload it.  Value of 0 would imply that polling is disabled.
--monitor
determines whether monitoring is switched on or not.  Default value is false.
--routecookie
determines whether route cookie is enabled or not.  Default value is true.
--target
The target can either be a cluster or an unclustered instance.
--property
name/value pairs
config_name
The name of the new load balancer configuration. This name must not conflict with any other load balancer groups, agents, configurations, clusters, or server instances in the domain.


12.7.2 delete-http-lb-config

The delete-http-lb-config command deletes a load balancer configuration. The load balancer must not reference any clusters or instances before it can be deleted.

Syntax 
delete-http-lb-config config_name


Argument Definition
config_name
The name of the load balancer configuration to delete.
       

12.7.3 list-http-lb-configs
The list-http-lb-configs command lists the load balancer config and its clusters/instances, or all the load balancer config in the domain.

Syntax 
list-http-lb-configs [target]


Argument Definition



target
target can either be a load balancer configuration name, instance name or cluster. 
If target is lb config, then the list of instances and clusters that references the config will be displayed.
If the target is either a cluster or an instance, then the lb config that references to the the cluster or instance will be displayed.
If target is not specified, then the list of all lb configs will be displayed.


12.7.4 create-http-lb-ref
The create-http-lb-ref command is used to add an existing cluster to an existing load balancer configuration.

Syntax 
create-http-lb-ref --config config_name [--lbpolicy lb_policy] [--lbpolicymodule lb_policy_module] [--healthcheckerurl url] [--healthcheckerinterval=30] [--healthcheckertimeout=10] [--lbEnableAllInstances] [--lbEnableAllApplications] target


Argument Definition
--config
The name of the load balancer configuration
--lbpolicy
Policy for lb
--lbpolicymodule
Policy module for lb
--healthcheckerurl
the URL to ping so as to determine the health state of a listener
--healthcheckerinterval
specifies the interval in seconds at which health checks of unhealthy instances carried out to check if the instances has turned healthy.  Default value is 30 seconds.  A value of 0 would imply that health check is disabled.
--healthcheckertimeout
timeout interval in seconds within which response should be obtained for a health check request; else the instance would be considered unhealthy.  Default value is 10 seconds
--lbenableallinstances
enable all the associated instances for a target cluster
--lbenableallapplications
enable all the associated applications for a target
target
The target to be added to the load balancer configuration.  target can either be a cluster or an instance name. 

12.7.5 delete-http-lb-ref
The delete-http-lb-ref command is used to delete a cluster/instance reference from a load balancer config. It is important to note that if you wish not to interrupt users accessing applications in the server you should ensure that all of its instances have been disabled before removing the cluster.

Syntax 
delete-http-lb-ref --config config_name target


Argument Definition
--config
The name of the load balancer configuration
target
The target to be deleted from the load balancer configuration.
target can either be a cluster or an instance name

12.7.6 export-http-lb-config
The export-http-lb-config command is used to explicitly create the loadbalancer.xml file consumed by the load balancer plugins. The exported file must then be manually copied to the load balancer plugins before the load balancer will apply any changes. In both configure-http-lb-config and export-http-lb-config commands, generated loadbalancer.xml file will need to be downloaded to the client (similar to Client JAR).

Syntax 
export-http-lb-config --config config_name [file_name]


Argument Definition
--config
The name of the load balancer cluster group to be exported.
file_name
The file name is optional and can be:
  • omitted in which case a file named loadbalancer.xml is created in the $INSTANCE_ROOT/generated directory.
  • a directory (relative or absolute) in which case a  file named loadbalancer.xml is created in the specified directory.
  • a file name (relative or absolute) in which case the named file is created.

12.7.7 disable-http-lb-server
The disable-http-lb-server command is used to disable a cluster/server managed by the load balancer. The term quiesce is sometimes used interchangeably with disable. The basic function is to gracefully take a load balanced cluster/server off-line with minimal impact to end users. Disabling therefore involves a timeout or grace period. The follow can be disabled using the disable-http-lb-server command:
Syntax 
disable-http-lb-server [--timeout
30] target


Argument Definition
--timeout
The timeout (in minutes) to wait before disabling the specified target. This allows for a graceful shutdown of the specified target.  The default value is 30 minutes.   Question: What kind of restrictions/semantics are there on timeout (e.g. does 0 imply an immediate shutdown)?
target
The target specifies what servers to disable and can be:
  • <cluster-name> -- the name of a cluster in the group whose servers are to be disabled.
  • <server-name> -- the name of a unclustered server instance to be disabled

12.7.8 enable-http-lb-server
The enable-http-lb-server command is used to re-enable a previously disabled load balancer server instance.

Syntax 
enable-http-lb-server target


Argument Definition
target
The target specifies which servers to enable and can be:
  • <cluster-name> -- the name of a cluster in the group whose servers and applications are to be enabled..
  • <server-name> -- the name of a unclustered server instance to be enabled.


12.7.9 disable-http-lb-application
The disable-http-lb-application command is used to disable a specific application managed by the load balancer. The term quiesce is sometimes used interchangeably with disable. The basic function is to gracefully take a load balanced application off-line with minimal impact to end users. Disabling therefore involves a timeout or grace period. Disabling an application gives a finer granularity of control than disabling a server instance and is most useful when a cluster is hosting multiple independent applications. The following can be disabled.
Syntax 
disable-http-lb-application [--timeout
30] --name application_name target


Argument Definition
--timeout
The timeout (in minutes) to wait before disabling the specified target. This allows for a graceful shutdown of the specified target.  The default value is 30 minutes.  Question: What kind of restrictions/semantics are there on timeout (e.g. does 0 imply an immediate shutdown)?
--name
The name of the application which is to be disabled
target
The target specifies where the application is to be disabled and can be one of the following:
  • <cluster-name> in which case the application is disabled across the stated cluster only.
  • <server-name> -- the name of a unclustered server instance where the application is deployed.


12.7.10 enable-http-lb-application

The enable-http-lb-application command is used to re-enable a previously disabled load balancer application.

Syntax 
enable-http-lb-application --name application_name target


Argument Definition
--name
The name of the application which is to be enabled.
target
The target specifies where the application is to be enabled and can be one of the following:
  • <cluster-name> in which case the application is enabled across the stated cluster only.
  • <server-name> -- the name of a unclustered server instance where the application is deployed.


12.7.11 create-http-health-checker
The create-http-health-checker command is to create a health checker to a load balancer configuration.  The command will require a load balancer configuration name.  The command can optionally accept the health checker URL, interval in seconds and timeout in seconds.   By default the health checker will be configured.  This applies only to our native load balancer.

Syntax 
create-http-health-checker [--url "/"] [--config config_name] [--interval 30] [--timeout 10] target


Argument Definition
--url
the URL to ping so as to determine the health state of a listener.
--interval
specifies the interval in seconds at which health checks of unhealthy instances carried out to check if the instances has turned healthy.  Default value is 30 seconds.  A value of 0 would imply that health check is disabled.
--timeout
timeout interval in seconds within which response should be obtained for a health check request; else the instance would be considered unhealthy.  Default value is 10 seconds.
--config
name of  the load balancer configuration to create the health checker.
target



12.7.12 delete-http-health-checker
The delete-http-health-checker command is to delete a health checker to a load balancer configuration.  The command  requires a load balancer configuration name.

Syntax 
delete-http-health-checker
--config config_name target


Argument Definition
--config
name of  the load balancer configuration to delete the health checker.


13.7.1 create-http-lb
command to create the loadbalancer in the appserver config

Syntax
asadmin create-http-lb --config lb_config_name [--autoapplyenabled=false] [--devicetype=SUNLBPLUGIN] --devicehost device_host_or_ip  --deviceport device_port --adminuser device_admin_user --adminpassword device_admin_password [--sslproxyhost proxy_host] [--sslproxyport proxy_port]  [--property (name=value)[:name=value]*] <load-balancer-name>

Argument Definition
name lb name
--enabled when true, application server changes are propagated to this device
--config
name of the lb-config used by this load balancer
--autoapplyenabled
immediately push changes to lb config to the physical lb
--devicetype
type of appliance; default is load balancer plug-in from Sun - SUNLBPLUGIN, other supported values are BIGIP, SUNNAUTICUS
--devicehost
Host name or IP address for the device
--deviceport
Device administration port number
--adminuser
Valid user name for the device
--adminpassword
Valid password for the device
--sslproxyhost
proxy host used for outbound HTTP
--sslproxyport
proxy port used for outbound HTTP
--property
comma separated list of name/value pairs

13.7.2 delete-http-lb
command to delete the loadbalancer element

Syntax
asadmin delete-http-lb <load-balancer-name>

Argument Definition
name lb name

13.7.3 list-http-lbs
command to list the loadbalancers

Syntax
asadmin list-http-lbs

13.7.4 apply-http-lb-changes
Publishes the changes to load balancer

Syntax
asadmin apply-http-lb-changes <lb-name>

13.7.5 configure-http-lb-config
This command will create a http-lb-config, enable all server(s) and application(s) for the target (example cluster), generate and export the loadbalancer.xml to the named file location.

Syntax

configure-http-lb-config [--responsetimeout=60] [--httpsrouting=false] [--reloadinterval=60] [--monitor=false] [--routecookie=true] [--healthcheckerurl url] [--healthcheckerinterval=30] [--healthcheckertimeout timeout] [--target target] [--config config_name] [xml-file-name]

Argument Definition
--responsetimeout timeout interval in seconds within which a response must be received from the application server. If the request is configured as idempotent, it will be retried, else the error page will be returned. Default value is 60
--httpsrouting determines whether the load balancer should route the incoming HTTPS request as HTTPS request to the instance.  Default value is false
--reloadinterval
reload pool interval in seconds at which load balancer has changed.  If it has change, load balancer would reload it.  Value of 0 would imply that polling is disabled
--monitor determines whether monitoring is switched on or not.  Default value is false
--routecookie
determines whether route cookie is enabled or not.  Default value is true
--healthcheckerurl
the URL to ping so as to determine the health state of a listener
--healthcheckerinterval
specifies the interval in seconds at which health checks of unhealthy instances carried out to check if the instances has turned healthy.  Default value is 30 seconds.  A value of 0 would imply that health check is disabled.
--healthcheckertimeout
timeout interval in seconds within which response should be obtained for a health check request; else the instance would be considered unhealthy.  Default value is 10 seconds
--target
The target can either be a cluster or an unclustered instance
--config
The name of the new load balancer configuration. This name must not conflict with any other load balancer groups, agents, configurations, clusters, or server instances in the domain
xml-file-name
The location of the file where the exported loadbalancer.xml has to be copied to.


13.7.6 configure-lb-weight
Assign weights for the server instances of a cluster

Syntax
asadmin configure-lb-weight --cluster cluster_name <instance-name=weight[:instance-name=weight]>