Advisors are software agents that work within Load Balancer to provide information about
the load on a server. A different advisor exists for each standard protocol (HTTP, SSL, and others).
Periodically, the Load Balancer base code runs an advisor cycle, during which it individually
evaluates the status of all servers in its configuration.
Before you begin
Advisors are agents within Load Balancer. Their purpose is to assess the health and loading of
server machines with a proactive client-like exchange with the servers. Advisors can be considered
as lightweight clients of the application servers.
By writing your own advisors for the Load Balancer, you can customize how your server machines’
load is determined.
For more information on how advisors work, read Advisors.
If you are using IPv6 protocol on your machine and want to use advisors, you must
modify the protocol file. To enable IPv6, insert the following line in the protocol file:
ipv6-icmp 58 IPv6-ICMP # IPv6 interface control message protocol
The protocol
file is in the following directory:
- /etc/protocols
-
C:\windows\system32\drivers\etc\
The product provides several protocol-specific advisors for the most popular protocols. However,
it does not make sense to use all of the provided advisors with Load Balancer. Load Balancer also
supports the concept of a "custom advisor" that allows users to write their own advisors.
Restriction: To use advisors on bind specific servers, start two instances of the server:
One instance to bind on the cluster@port and the other
instance to bind on the server@port. To determine whether the
server is bind specific, issue the netstat -an command and look for the
server@port. If the server is not bind specific, the result
from this command is 0.0.0.0:80. If the server is bind specific, you see an address such as
192.168.15.103:80
.
About this task
You can start an advisor for a particular port across all clusters (group advisor). Or, you
can choose to run different advisors on the same port, but on different clusters (cluster specific
advisor). Note: If Load Balancer is running on a computer with multiple network adapters, you cannot
force the source IP address of the packet to a specific address. This restriction is a concern when
you want the advisor traffic to flow over a particular adapter.
Procedure
-
Start the advisor of your choice.
For a list of possible advisors, refer to the
list of
advisors, or
create a custom advisor.
- Cluster-specific advisor
- To start an advisor on port 80 for clusterA, for example, specify both the cluster and
port:
dscontrol advisor start ADV_name clusterA@80
This
command starts an advisor on port 80 for clusterA. This advisor advises on all servers that are
attached to port 80 for clusterA.
- Group advisor
- To start an advisor on port 80 for all other clusters, specify the port:
dscontrol advisor start ADV_name 80
This command starts
the advisor on port 80 for all clusters and sites that do not currently have a cluster or
site-specific advisor. Your advisor advises on all servers that are attached to port 80.
- Optional:
If you are starting the HTTP or HTTPS advisor, you might want to define a unique client URL
string to allow the advisor to monitor individual services in the server. For more information, see
Getting service-specific advice with the advisor
request or response option.
- Optional:
Set the advisor interval.
The advisor interval sets how often an advisor asks for status from the servers on the port it
is monitoring and then reports the results to the manager. If the advisor interval is too low, it
can mean poor performance as a result of the advisor constantly interrupting the servers. If the
advisor interval is too high, it can mean that the manager’s decisions about weighting is not based
on accurate, up-to-date information.
Note: The advisor defaults work efficiently for most possible
scenarios. Be careful when you enter values other than the defaults.
For example, to set the
interval to 3 seconds for the HTTP advisor for port 80, enter the following command:
dscontrol advisor interval http 80 3
It does not make sense to specify an
advisor interval that is smaller than the manager interval. The default advisor interval is 7
seconds.
- Optional:
Set the advisor report timeout.
The manager can make sure that out-of-date information is not used in its load-balancing
decisions. The manager does not use information from the advisor whose timestamp is older than the
time set in the advisor report timeout. The advisor report timeout must be larger than the advisor
polling interval. If the timeout is smaller, the manager ignores reports that logically would be
used. By default, advisor reports do not time out. The default value is unlimited.
For example, to set the advisor report timeout to 30 seconds for the HTTP advisor for port 80,
enter the following command:
dscontrol advisor timeout http 80 30
For more
information on setting the advisor report timeout, see
dscontrol advisor.
- Optional:
Set the advisors connect and receive timeout values.
For Load Balancer, you can set the advisor’s timeout values at which it detects a particular
port on the server (a service) is failed. The failed-server
connecttimeout
and
receivetimeout
timeout values determine how long an advisor waits before it reports
that either a connect or receive has failed.
To obtain the fastest failed-server detection, set
the advisor connect and receive timeouts to the smallest value , which is 1 second, and set the
advisor and manager interval time to the smallest value, which is 1 second.
Note: If your environment
experiences a moderate to high volume of traffic such that server response time increases, be
careful not to set the connecttimeout
and receivetimeout
values
too small. The advisor might prematurely mark a busy server as failed.
For example, to set the connecttimeout and receivetimeout to 9 seconds for the HTTP advisor on
port 80, type the following command:
dscontrol advisor connecttimeout http 80 9
dscontrol advisor receivetimeout http 80 9
The default for connect and receive timeout
is three times the value that is specified for the advisor interval time.
- Optional:
Set the advisor retry value.
Advisors can retry a connection before they mark a server down. The advisor does not mark a
server down until the server query fails the number of retries plus 1. The retry value must be no
larger than 3.
The following command sets a retry value of 2 for the LDAP advisor on port 389:
dscontrol advisor retry ldap 389 2