multiple freeradius instances with sqlippool, is it safe?

Alan DeKok aland at deployingradius.com
Tue Mar 22 12:06:06 UTC 2022


On Mar 22, 2022, at 5:13 AM, Nick Porter <nick at portercomputing.co.uk> wrote:
> 
> As Nathan says, it is worth looking at the most recent queries in FreeRADIUS version 3.0.25 - significant optimisation has been done on the default IP pool queries of late.
> 
> The key is that appropriate record locking is done during the allocation of addresses.
> 
> With PostgreSQL, the UPDATE ... RETURNING ... syntax can be used to reduce the the number of round trips to the database, also reducing the time that records are locked.
> 
> Presuming you are using a PostgreSQL version >= 9.5, ensure you include SKIP LOCKED, which makes a huge difference to the query performance.

  I'll also add that it doesn't usually make sense to have multiple RADIUS servers use one database.  Many databases "max out" at very low numbers of IP allocations per second.  Where FreeRADIUS can easily handle tens of thousands of packets per second.

  That being said, if you're using the 3.0.25 queries, you should be safe up to a few thousand packets/s.  For higher performance, you'll have to move to something else like Redis.

  Alan DeKok.



More information about the Freeradius-Users mailing list