Simple 2 Server High Availability

Paul Thornton prt at
Wed Aug 6 10:47:30 CEST 2014


On 05/08/2014 16:21, James Bensley wrote:

> Can anyone who is doing this confirm what they have done or have you
> tried this and it failed terribly? If you have two servers for
> load-balacning how have you done it if you are using a different
> configuration?

We achieve this in a slightly unconventional way to get around the issue 
of replication and dual master.

All of our FR servers have a local MySQL DB that they, and they alone, 
query and update.

We have a primary "first among equals" server that all DB updates are 
made to (assuming normal operation), and this server has a cron-driven 
process every 4 hours to manually copy key tables from the "main" server 
to the "slaves".  This operates without any MySQL replication involved - 
just a mysqldump piped into a mysql.

We copy: nas radcheck radgroupcheck radgroupreply radpostauth radreply 

We don't copy any of the accounting tables - so the accounting records 
are saved to whichever server the NAS happens to be talking to at the 
time.  This works out OK for us, as we don't use the accounting records 
for anything critical - and when using them for troubleshooting etc. we 
have scripts that query all servers so it doesn't matter if a start and 
stop are on different machines.

This works for us as (a) there are few DB changes so replication in 
real-time isn't necessary, and (b) the load from the NASes to the FR 
servers is sufficiently low that the tables being locked during the sync 
is not an issue.  I suspect that under any serious loading, this would 
very quickly be a non-starter; it depends a bit if you're going for load 
balancing for redundancy or scaling.


More information about the Freeradius-Users mailing list