(RADIATOR) Radiator + Mysql.

Ingvar Bjarnason ingvarbj at centrum.is
Mon Feb 9 05:21:19 CST 2004


Hi Wesley,

1) Only one connection per Radiator thread as far as I know.  This generally
means that when a timeout occurs for example if the accounting table is
busy/locked etc then you will loose the connection for the timeout period.

2) We use a preclienthook to capture the realm before any further processing
occurs and insert it again into the current request as an attribute (we
called it Ldap-Realm) or alternatively insert a default into the attribute
if the realm is missing.

#PreclientHook
PreClientHook sub {\
my $r="defaultrealm.com";\
my $u=${$_[0]}->get_attr('User-Name');\
$r=$1 if( $u =~ /^[^\@]*\@([^\s].*)$/ );\
&main::log($main::LOG_DEBUG,"Preclienthook sets Ldap-Realm to:($r)");\
${$_[0]}->add_attr('Ldap-Realm',$r);\
}

There are other ways of doing this but this was effective and to the point
for us.  To use the variable later on simply use

%{Ldap-Realm}

anywhere in the config.

Cheers,
Ingvar Bjarnason

Senior Engineer
Iceland Telecom

----- Original Message ----- 
From: "Wesley Hof" <wesleyh at staf.planetinternet.be>
To: "Mike McCauley" <mikem at open.com.au>
Cc: <radiator at open.com.au>
Sent: Monday, February 09, 2004 7:29 AM
Subject: (RADIATOR) Radiator + Mysql.


> Hi List,
>
> I have 2 questions:
>
> 1) Assume radiator has to handle a lot accounting requests, stored in
>    a mysql database. Will radiator open up more then one connection
>    to the mysql database ? Or will it use one connection to store
>    everything. In the second case, is there a way to force radiator
>    to open more then one connection then?
>
> 2) I strip realms with the RewriteUsername option, is there a way to put
the
>    realm in a variable. I store my accounting in a mysql database, but I
would like to store the username and the realm in a seperate field. Is this
possible?
>
> Thanks in advance.
> W.
>
> --
> (o_  Wesley Hof
> //\  UNIX System Engineer
> V_/_ UNInet ))) A Scarlet Company
> ===
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list