Advisors are software agents that work within Load Balancer
to provide information about the load on a given server. A different
advisor exists for each standard protocol (HTTP, SSL, and others).
Periodically, the Load Balancer base code performs 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. They do this
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.
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.
Limitation on using advisors
with bind-specific server applications:- In order 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 if 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 will
be 0.0.0.0:80. If the server is bind specific, you will see an address
such as 192.168.15.103:80.
If using arp publish instead
of the ifconfig alias command, Load Balancer
will support the use of advisors when load-balancing servers with
bind-specific server applications when they are binding to the cluster
IP address.
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 adapter
cards, you cannot force the source IP address of the packet to a specific
address 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 will start an advisor on port 80 for clusterA. This advisor
will advise on all servers attached to port 80 for clusterA.
- Group advisor: To start an advisor on port 80 for all
other clusters, simply specify the port:
dscontrol advisor start ADV_name 80
This
command will start the advisor on port 80 for all clusters and sites
that do not currently have a cluster or site specific advisor. Your
advisor will advise on all servers 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 on this option, refer to 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 will not be based on accurate,
up-to-date information.
Note: The advisor defaults should work efficiently
for the great majority of possible scenarios. Be careful when entering
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. To make sure that out-of-date information is not used by the
manager in its load-balancing decisions, the manager will not use
information from the advisor whose time stamp is older than the time
set in the advisor report timeout. The advisor report timeout should
be larger than the advisor polling interval. If the timeout is smaller,
the manager will ignore reports that logically should be used. By
default, advisor reports do not timeout — 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 timeout values (connecttimeout
and receivetimeout) determine how long an advisor waits before reporting
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 (one second), and set the advisor and manager
interval time to the smallest value (one 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, or the advisor may 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 3 times the value specified for
the advisor interval time.
- Optional: Set the advisor retry value. Advisors have the ability to retry a connection before marking
a server down. The advisor will not mark a server down until the server
query has failed the number of retries plus 1. The retry value should
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