Greetings All, Had a couple of goes replying to a thread that asked about a doc for the Mod_Proxy balancer, and twice qmail sent it back saying the 'subject' was empty. Hopefully this works. Attached (maybe) is something I've pulled together from digging, and look to some detailed docs in the near future. HTH, NormTitle: Mod_Proxy - Configuration
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_1The "key" can be any of the following:
| Key Name | Description | Constraint(s) |
|---|---|---|
| nofailover | Disable failover for sticky sessions | Must be 'on' or 'off' |
| stickysession | Sticky Session identifier | |
| timeout | Timeout for waiting on free connection | Must be at least one second |
For the Balancer members:
- <method> identifies the protocol to use by the BalancerMember (http, ftp, ajp),
- <IP/DNS>:<port> identifies the location of the proxy machine.
The "key" can be any of the following:
| Key Name | Description | Constraint(s) |
|---|---|---|
| loadfactor | Initial load balancing factor | Must be between 1..100 (percent) |
| retry | Retry interval | Must be at least one second |
| ttl | Maximum time (seconds) a connection
may be available while exceeding the soft limit | Must be at least one second |
| min | Desired minimum number of available connections | Must be positive number |
| max | Hard maximum on the total number of connections | Must be positive number |
| smax | Soft maximum on the total number of connections | Must be positive number |
| acquire | Acquire timeout when maximum connections is exceeded | Must be at least one milli-second |
| timeout | Connection timeout | Must be at least one second |
| iobuffersize | Input-Output buffer size | Must be >= AP_IOBUFSIZE |
| receivebuffersize | Receive buffer size | Must be >= 512 bytes, or 0 for system default |
| keepalive | Enable/Disable Keepalive for this worker | Must be 'on' or 'off' |
| route | Balancing route | val |
| redirect | Temporary balancing redirection route | val |
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:
- Inside a <Location > block
<Location /admin/>
Proxypass <balancer name>
</Location>
- In a single statement
Proxypass <balancer name> /admin/
