Specifications
Equalizer Installation and Administration Guide 161
A Using Server Agents
Introducing Server Agents
You can configure Equalizer's load balancing algorithms to accept direct feedback from servers that
describe the current server load or availability of critical resources. This is done by writing a server
agent and deploying it on your servers.
The agent must listen on and be able to respond to TCP connections on a well-known port. The
response is in the form of an ASCII string (an integer between -1 and 100) that represents the
current load on the server, or indicates that service is not available. If an agent indicates that service
is unavailable, Equalizer will automatically stop sending requests to that server.
You configure server agents on a cluster-wide basis—all the servers in a virtual cluster must be
running agents for server agents to be used for adaptive load balancing. When you have enabled
server agents, Equalizer periodically probes the agent at each server's IP address through the
configured agent port. Equalizer uses the collected server agent values when performing adaptive
load balancing calculations. You configure Equalizer to use server agents through the Change
Cluster dialog box. (For more information, see “Configuring a Cluster to Use Server Agents” on
page 78.)
Agents and Load Balancing Policies
Agents work with all load balancing policies (see “Equalizer’s Load Balancing Policies” on page
74), except for round robin (which simply ignores any agent defined for the cluster). All the other
policies use the integer returned by the agent as one factor in determining the server to which a new
request is sent.
The server agent policy gives primary importance to the value returned by an agent over other load
balancing factors (server weight, number of current connections, etc.).
Enabling Agents
Agents are enabled for a cluster by turning on the server_agent flag in the add cluster or modify
cluster screens. Turing on this flag also changes the agent port setting from 0 (off) to 1510, the
default port used for agents. Make sure that any agent you write and deploy is listening on the same
port number on the servers.
By default, Equalizer will open up a connection to the server agent’s IP/port, and wait for a
response. If no response is received, then the Equalizer performs load balancing without the server
agent value for that server.
Some agents, particularly those written in Java, may require that a string be sent to the agent before
a response is sent back to Equalizer. The advanced field agent probe is provided for this purpose. If
a string appears in this field, it is sent to the agent when an agent probe occurs.