Am 11.08.2011 19:39, schrieb Fabian Borot:
thank you alex
so that means that we can populate the subscribers table manually, so
that when a user is going to register the first time kamailio will look
the account up and get the user, passwd etc to prepare the md5
challenge.
Yes
Then once the user is able to register depending
on the
settings for usrloc db [db_mode=0,1,2,3] the record will be in memory
and/or db.
No. The subscriber table is never cached. Every authentication request
will cause a lookup in the database.
and if we have a huge subscribers table, since
apparently kamailio wont
load those values in memory [only the AOR for the registered users] that
is not a problem at all right?
Thus, Kamailio does not care how many subscribers
are in the table.
Regarding load, the only thing that matters is the number of
authentication requests per time interval.
You can not avoid the authentication load for INVITEs, but you can
increase the "idle load" caused by REGISTER requests by increasing the
expire value.
just to point some caching solution in case one wants to avoid too
many
DB lookup. htable module can be used to store the password after a
successful authentication for a period of time. The logic will be like:
- request comes in
- get from htable the password for the user
- if password not in HT, do auth using database and load the password in
credentials and store it in HT if auth ok
- if password in HT, do auth using variables
HT has auto-expires capabilities, so cached passwords will be deleted
after a while and the password value will be loaded next time when is
needed. The drawback is that when the password is changed, it may take
up to auto-expire interval to be effective.
Cheers,
Daniel
--
Daniel-Constantin Mierla --