Hello Steve -
On Tue, 01 Feb 2000, Steve Suehring wrote:
> I hate to even ask this question and I apologize in advance for it. I
> thought I remember seeing it in the docs or somewhere, but I can't find
> it.
>
Not at all - its perhaps not obvious unless you read (study?) the code.
> If I have a number of <Realm domain.com> clauses in the config but the
> majority of the requests are handled by just the <Realm> clause, can I
> move that <Realm> clause to the top to gain any performance advantages?
> Or is that <Realm> clause a catch-all and no requests will pass by?
>
> Also will moving the <Client> clauses to the bottom and <Realm>'s to the
> top help performance at all?
>
Perhaps a short dissertation on the configuration file is in order here.
The first thing to understand about the configuration file is that it is a
static representation of the processing you want to occur, it is not a
programming language. It then follows that the configuration file is read once
at startup (or re-initialisation) and the following things occur for Clients,
Realms and Handlers.
Client objects are created inside Radiator, one per Client defined in the
configuration file, order is not important as the objects are held in a Perl
hash. The Client object is refered to directly for every radius request
processed.
Realms are also created inside Radiator in a Perl hash which is accessed
directly by the suffix present in a username in a radius request. Again order
in the configuration file is unimportant.
Handlers however, are stored inside Radiator in the order that they appear in
the configuration file, and a sequential walk down the list, checking the
Handlers' conditions is performed to find the corresponding match. It then
follows that you must put more specific Handler's before more general Handler's
and the DEFAULT Handler must come last of all.
Now you are correct in your observation above that in the case of Handler's,
you can improve performance by putting your most commonly hit Handler first in
the configuration file (modulo the constraints above!).
This discussion also demonstrates why you should not mix Realm's and Handler's
in the same configuration file without knowing exactly what you are doing. This
is because Realm's are always processed first, before any Handler's are
processed, and obviously this can lead to non-intuitive operation in some cases.
Thanks for asking the question!
(everything you always wanted to know but were afraid to ask ....)
regards
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.