Question on processing delayed proxy packets

Alan DeKok aland at deployingradius.com
Fri Dec 11 09:32:26 CET 2009


Patric wrote:
> As you can see, the above query will set acct_input_octets = 5 on server
> B, so now server A has acct_input_octets = 7 and server B has
> acct_input_octets = 5.

  Yup.

  Most people solve this problem by doing post-processing of the tables.

> If a db entry exists, and the acct_input_octets in the db entry is more
> than the current packet we are processing, then the packet data is older
> than the db data in the record, so we want to ignore the packet and keep
> the db data. (Obviously we will need to apply the check to
> acct_output_octets and the gigaword fields as well...)

  I would suggest instead using "time the packet was sent by the NAS".
If a table entry has a time GREATER than the current packet, then the
current packet can be safely discarded.

> So the very first problem we see is that checking the record before
> processing the new update is going to slow down the entire process.

  It shouldn't slow it down too much.  It's the price you pay for strong
consistency.

  And ideally, it should be done inside of a transaction, so that
*multiple* packets received at the same time for the same user don't
cause problems.  But that race condition should be pretty rare.

  Alan DeKok.



More information about the Freeradius-Users mailing list