3.53.3. <AuthBy LOADBALANCE> Previous topic Parent topic Child topic Next topic

When using <AuthBy LOADBALANCE>, the incoming RADIUS requests are distributed between all the listed hosts according to the relative values of their BogoMips attributes and the time the remote server takes to process requests. BogoMips is intended to be a relative measure of the processing power of that host. A Host with a BogoMips rating of 2 receives twice as many requests as the one with the default BogoMips rating of 1. Every request that is proxied and receives a reply has its turnaround time, which is measured in microseconds. A sliding average response time over the last 10 request is calculated. Requests are proxied to the server that is currently responding fastest. If at any time a proxied request does not receive a reply from a remote server, that server is marked as unavailable until FailureBackoffTime seconds has elapsed. Meanwhile, that request is retransmitted to the next host due to be used.
The result of this algorithm is to distribute the load until the BogoMips-weighted response time is the same for all servers. This allows the load balancing to adapt to the changes in the available processing capacity of a remote host.
For more information about configuring the BogoMips parameter, see Section 3.39.1. BogoMips.

Example

In this example, Radiator running by itself on a host distributes RADIUS requests to 3 remote servers. The second host has twice the processing power of the others, and therefore gets twice as many requests as the other 2.
....
# Proxy all requests to remote hosts inside our network:
<Handler>
      <AuthBy VOLUMEBALANCE>
            # If a host fails, do not send to it again
            # for 100 seconds
            FailureBackoffTime 100
            # Default values for all hosts. You can change
            # them for a single host in a Host clause
            Secret mysecret
            RetryTimeout 1
            Retries 1
            # Hosts to send to are listed below
            <Host 203.63.154.2>
            </Host>
            <Host 203.63.154.3>
                  BogoMips 2
            </Host>
            # This host has non-standard ports
            <Host 203.63.154.4>
                  AuthPort 1647
                  AcctPort 1648
            </Host>
      </AuthBy>
</Handler>