Redundancy recommendation.

Alan DeKok aland at
Thu Aug 12 16:58:26 CEST 2021

On Aug 12, 2021, at 10:45 AM, Pizu <pizpower at> wrote:
> I have 2 FreeRadius + MySQL servers in 2 different locations and everything
> is working with no issues, now I'd like to add redundancy for MySQL.

  What kind of redundancy?  radacct, or radcheck?  They're different.

  For radcheck / radreply, use MySQL replication.

  For radacct, use detail files and proxying.  i.e. have RADIUS1 proxy to RADIUS2, and RADIUS2 to RADIUS1.

  See raddb/copy-acct-to-home-server for examples.

> Options:
> 1) MySQL MASTER/MASTER Replication
> 2) MySQL Master/Slave
> 3) FreeRadius SQL redundancy
> 4) any other idea?
> I have already tested the option 1 but am not happy with it as am have some
> errors with the accounting id in the db as am having duplicate entries.

  Yes.  MySQL does row-level replication.  It doesn't know what the rows *mean*.  So it can't deal with differences or conflicts.

  FreeRADIUS understands what the rows mean, so it can deal with differences and conflicts.

> For
> option 3 when the local mariadb is stopped the server doesn't start, is it
> normal?

  Yes.  See the "pool" section of mods-available/sql.  This is documented.

  A related question is "what do you want FreeRADIUS to do when SQL is down?"

  i.e. if the SQL server is down, where do the packets go?

  See raddb/sites-available/buffered-sql

  There are a ton of examples in the sites-available directory.  Many common situations are documented extensively.

  Alan DeKok.

More information about the Freeradius-Users mailing list