Freeradius as a loadbalancer - logging dropped accounting requests

Aleš Rygl ales at rygl.net
Mon Jun 26 14:01:29 CEST 2017


Hello,

I am running several instances of Freeradius 3.0.13 on a single machine and one of them acts as a load balancer distributing just accounting request among four home servers listening on loopback on different ports:

thread pool {
        start_servers = 64
        max_servers = 1500
        min_spare_servers = 50
        max_spare_servers = 80
        max_requests_per_server = 0
        auto_limit_acct = no
}


realm NULL {
        acct_pool = DRACO_acct_pool
        nostrip
}

realm DEFAULT {
        acct_pool = DRACO_acct_pool
        nostrip
}

home_server_pool DRACO_acct_pool {
        type = keyed-balance
        home_server = rzt-gc-01
        home_server = rzt-gc-02
        home_server = rzt-gc-03
        home_server = rzt-gc-04
}

home_server rzt-gc-01 {
        type = acct
        ipaddr = 127.0.0.1
        port = 2814
        secret = testing123
        response_window = 20
        zombie_period = 40
        revive_interval = 120
        status_check = status-server
        check_interval = 10
        check_timeout = 4
        num_answers_to_alive = 3
        coa {
                irt = 2
                mrt = 16
                mrc = 5
                mrd = 30
        }
        limit {
              max_connections = 16
              max_requests = 0
              lifetime = 0
              idle_timeout = 0
        }
}

... and so on.

The load is quite heavy - about 3.5k req/s. Balancing works fine, the key is Calling-Station-ID (MSISDN). What I can see is that there are some dropped packets in the stats:

# echo "stats client acct" | radmin -d /etc/freeradius_lb/ 
radmin> stats client acct
requests        39511449
responses       39508797
dup             0
invalid         0
malformed       0
bad_authenticator       0
dropped         1584
unknown_types   0
last_packet     1498477859
elapsed.1us     0
elapsed.10us    0
elapsed.100us   33765867
elapsed.1ms     5742921
elapsed.10ms    9
elapsed.100ms   0
elapsed.1s      0
elapsed.10s     0
radmin> 

The homeservers have no performance issues:

# echo "stats client acct" | radmin -d /etc/freeradius_04/ 
radmin> stats client acct
requests        159032334
responses       159030646
dup             21
invalid         0
malformed       0
bad_authenticator       0
dropped         21
unknown_types   0
last_packet     1498478023
elapsed.1us     0
elapsed.10us    0
elapsed.100us   158795858
elapsed.1ms     234786
elapsed.10ms    2
elapsed.100ms   0
elapsed.1s      0
elapsed.10s     0
radmin> 

Is there a way how to indetify the reason why are some req. dropped? I.e. logging such requestest? LB  there is no lack of CPU or memory on the server, no drops in the UDP stack..

Thanks
Ales





More information about the Freeradius-Users mailing list