[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Large multiple "if" optimisation
From:       Jonathan Gazeley <Jonathan.Gazeley () bristol ! ac ! uk>
Date:       2013-11-21 11:29:13
Message-ID: 528DEE89.7020604 () bristol ! ac ! uk
[Download RAW message or body]

On 20/11/13 17:33, Phil Mayers wrote:
> On 20/11/13 16:57, Jonathan Gazeley wrote:
>
>> It's getting a bit unwieldy to manage this block, so I'm looking for a
>> better way of writing it. However it must be fast, as every eduroam user
>> hits this, i.e. database lookups are unsatisfactory. Flat files might be
>
> Shrug. We do a database lookup on source MAC, cached in an rlm_cache 
> instance. It works fine. Get a faster database!
The database is nice and sporty and there are no particular problems 
with it. Rather, after the recent discussions on this list about how 
easily queues can back up when packet processing is even slightly slow. 
I don't want to add any unnecessary opportunities for external blocking. 
AD/NTLM is enough of a headache on its own ;)
>
>> ok depending on how they cached.
>
> A "files" module is loaded into RAM and keyed into a hash table. It'll 
> be lightning fast. Something like this:

Lightning fast.. good to know. Thanks.

>
>
>
> However a "files" module is only reloaded on hup. If you want proper 
> dynamism, use an SQL lookup and wrap it in rlm_cache e.g.
>

Ah, I wasn't aware that caching could be used with SQL. This sounds like 
a good solution.

Thanks for your advice,
Jonathan
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic