merging accounting records from two databases
Stella Power
snpower at maths.tcd.ie
Wed Sep 26 16:12:25 CEST 2007
I'm sure that would work if they were normal (non-radius) records in a
database. The problem is there are two accounting records (stop and start).
When radius receives a start record it just inserts it into the database
(easy) but when it receives a stop record, it tries to find the original
start record and update that entry. If it can't find it, it just inserts it.
Now, if the start record is added to one database and the stop to the other,
when I merge/replicate the data, I need to update the start record with the
stop record from the other db, so I end up with one table entry instead of
two. I'm pretty sure with normal database replication methods, I would end
up with two entries in the database instead of one merged one.
Cheers,
Stella
On Wed, Sep 26, 2007 at 03:06:42PM +0100, Andy Billington wrote:
> Given my levels of FreeRADIUS knowledge vs MySQL, I would go with a
> database-level approach :-)
>
> What version of MySQL are you using - you could maybe cluster the databases?
>
> Alternatively have RADIUS write to one database and use MySQL Proxy to
> handle the two databases if you dont want to cluster (ie use
> replication primary --> secondary, put proxy in the data flow and tell
> it to write to secondary if primary unavail, then when primary fixed,
> reverse the roles so what was the seconday becomes the primary,
> replicates data, and then you can either flip them back (if e.g. the
> original primary is heavier hardware) or not ..
>
> Andy
>
>
> On 26/09/2007, Stella <snpower at maths.tcd.ie> wrote:
> > Hi,
> >
> > We're setting up two radius servers and configuring them so the accounting
> > records are inserted into a mysql database. For redundancy, we're having two
> > radius servers and two database servers. Both radius servers will attempt to
> > write the records to the primary database, if that fails, the secondary
> > database will be used. However, I only see one place in the radius sql.conf
> > file to set the database connection settings. Is there anyway to set the
> > connection settings for a secondary database, or is there no failover? If
> > not, what do people suggest we use? A load balancer or some such?
> >
> > Another problem with this setup is that there may be records in the secondary
> > database which I need to add to the primary database. The main issue I have
> > is when the start record of a session is in one database and the stop record
> > is in the other. I need to match these two records up, so I have all the
> > records in both databases. Is there any application out there that will do
> > this or do I need to write my own? Surely someone else has encountered the
> > same issue?
> >
> > So can anyone advise on the above or point me at some documentation that
> > explains how to do this? All help much appreciated!
> >
> > Cheers,
> > Stella
> > -
> > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> >
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list