Request throttling
srithar jeevadurai
srijeevadurai1 at gmail.com
Thu Jul 2 17:01:04 CEST 2015
Hi Arran,
Thanks a lot for your reply. Let me explain the actual scenario.
1) Radius server is sending request to an external process over tcp/ip
socket for accounting (start/stop/interim) request.
2) Based on the external process response, radius (custom module) will
reply to GGSN.
3) Some time if response is slow from external process then radius server
is facing child hung error and we have to restart radius server for the
same.
4) Since it is online system, we don;t want child hung happens actual
intention is not to restart the system.
5) I believe that it is happening may be due to radius process queue is
filled with request and getting aged out.
Is there any throttling can be done at freeRadius to handle the same so
that it will not run into child hung state/no need to restart radius server.
I request you to provide your suggestion please.
Regards,
Srithar
On Thu, Jul 2, 2015 at 7:36 PM, Arran Cudbard-Bell <
a.cudbardb at freeradius.org> wrote:
>
> > On 2 Jul 2015, at 09:47, srithar jeevadurai <srijeevadurai1 at gmail.com>
> wrote:
> >
> > Dear Friends,
> >
> > Can we do throttling of no of request in process queue at freeRadius?
> >
> > FreeRadius is depending on mysql, if mysql db connectivity is down for
> some
> > time then GGSN will feed freeRadius.
>
> If the database is down adjust the query and connection timeouts to ensure
> the worker threads don't block for an excessively long period.
>
>
> > Radius server may run into the 'child hung' issue then we need to restart
> > freeRadius.
> >
> > To avoid child hung and restart of system. Can we do following?
>
> If you're dealing with traffic spikes:
>
> Determine the optimal number of parallel inserts.
>
> Set the max connections in the SQL pool to be that number.
>
> Use a detail writer/reader to insert the excesss requests into a file
> based queue.
>
> accounting {
> sql {
> fail = 1
> }
> if (fail) {
> detail
> }
> }
>
> Example of the detail reader/writer here:
>
>
> https://github.com/FreeRADIUS/freeradius-server/blob/v3.1.x/raddb/sites-available/decoupled-accounting
>
>
> >
> > 1) Apply a cap on freeRadius processing queue i.e. if backlog on
> processing
> > queue is more than 50000 request then reject requests further request
> until
> > it comes down less than 50000.
>
> and drop accounting data in the process?
>
> > It will avoid child hung issue.
>
> Probably not.
>
> > My understanding on child hung:
>
> Is incorrect.
>
> > 1) If backlog is more in processing queue then it will spend time on
> > processing head of the queue.
> > 2) messages are reaching age limit of unattended age limit at tail of the
> > queue.
> > 3) Due to that child hung is happening.
>
> Nope. It's happening because your server is performing blocking calls to
> an overloaded database, which are taking too long.
>
> This would be one of the advantages to moving to an asynchronous
> processing model. We could set a hard coded one second query timeout, and
> force everyone to fix their databases.
>
> -Arran
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS development team
>
> FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
--
Regards,
Srithar Durairaj
Alternate Mail I.D: srijeevadurai1 at yahoo.co.in
Mobile: +919886251852
More information about the Freeradius-Users
mailing list