Dated 31August, 2004

Creating a Balancer

Coding example:

<Proxy balancer://<name>>
   BalancerMember  <method>://<IP/DNS>:<port> [key=value] [key=value ...]
   ....
</Proxy>

where <name> is any practical value.

Use the ProxySet directive to set any of the properties of the Balancer itself.

  ProxySet <balancer name> key=value [key=value ...]

For Balancers, their 'balancer name' comprises the method and <name>, for example:

  balancer://tcbal_1

The "key" can be any of the following:

Key NameDescriptionConstraint(s)
nofailoverDisable failover for sticky sessionsMust be 'on' or 'off'
stickysessionSticky Session identifier 
timeoutTimeout for waiting on free connectionMust be at least one second

For the Balancer members:

The "key" can be any of the following:

Key NameDescriptionConstraint(s)
loadfactorInitial load balancing factorMust be between 1..100 (percent)
retryRetry intervalMust be at least one second
ttlMaximum time (seconds) a connection may be available while
exceeding the soft limit
Must be at least one second
minDesired minimum number of available connectionsMust be positive number
maxHard maximum on the total number of connectionsMust be positive number
smaxSoft maximum on the total number of connectionsMust be positive number
acquireAcquire timeout when maximum connections is exceededMust be at least one milli-second
timeoutConnection timeoutMust be at least one second
iobuffersizeInput-Output buffer sizeMust be >= AP_IOBUFSIZE
receivebuffersizeReceive buffer sizeMust be >= 512 bytes, or 0 for system default
keepaliveEnable/Disable Keepalive for this workerMust be 'on' or 'off'
routeBalancing routeval
redirectTemporary balancing redirection routeval

Alternatively, use the ProxySet directive to set BalancerMember properties:

  ProxySet <member name> key=value [key=value ...]

For Balancer Members, their 'member name' comprises the method, host and port values, for example:

  ajp://myserver.com:8080

The current configuration of "Balancers" can be seen at the bottom of the /server-status/ page, if mod_status is loaded in the Apache Web Server.

Assigning a URL to a Balancer

To assign a URL segment to a Balancer, use the ProxyPass directive as follows:

  <Location /admin/>
    Proxypass <balancer name>
  </Location>
  Proxypass <balancer name> /admin/