The purpose of RLS is to aggregate NOTIFYs.  So RLS does not send NOTIFYs immediately.  The presentities it receives are put in to the rls_presentity table.

When not in DB only mode RLS runs a five second timer (configurable), and each five seconds it looks for updated rows in rls_presentity and sends out a batch of NOTIFYs (all at once).  This is roughly as per the RFC, but not a great mechanism as for five whole seconds no update NOTIFYs are sent and then all are sent at once.

When in DB only mode RLS runs one or more notifier processes that activate 10 times per second (configurable) and make sure that every front-end subscribe is serviced exactly once per five seconds (configurable).  This spreads the NOTIFY message generation processing and network traffic out across time.

In both cases (with default configuration) update NOTIFYs will take up to five seconds to come out of RLS.

Regards,

Peter

On Tue, 2012-09-11 at 17:34 +0300, Juha Heinanen wrote:
one rls thing that stilll wonders me is the about 2-5 sec delay that
occurs when backend notifies have been received and notify to subscriber
ua is sent:

Sep 11 17:27:41 siika /usr/sbin/sip-proxy[4495]: INFO: Routing PUBLISH <sip:foo@test.fi> to presence server
Sep 11 17:27:41 siika /usr/sbin/pres-serv[19270]: INFO: Handling PUBLISH <sip:foo@test.fi>
Sep 11 17:27:41 siika /usr/sbin/pres-serv[19270]: INFO: Routing locally generated NOTIFY <sip:rls@127.0.0.1:5082;transport=tcp> to <sip:jh@test.fi> from <sip:foo@test.fi>
Sep 11 17:27:41 siika /usr/sbin/pres-serv[19270]: INFO: presence [notify.c:1575]: NOTIFY sip:jh@test.fi via sip:rls@127.0.0.1:5082;transport=tcp on behalf of sip:foo@test.fi for event presence
Sep 11 17:27:41 siika /usr/sbin/pres-serv[19271]: INFO: Handling in-dialog NOTIFY <sip:rls@127.0.0.1:5082;transport=tcp> from <sip:foo@test.fi> to <sip:jh@test.fi>
Sep 11 17:27:46 siika /usr/sbin/pres-serv[19265]: INFO: Routing locally generated NOTIFY <sip:cyvrphbz@192.98.103.1:60122;alias=192.98.103.1~47419~2;transport=tcp> to <sip:jh@test.fi> from <sip:jh-buddies@test.fi>
Sep 11 17:27:46 siika /usr/sbin/sip-proxy[4482]: INFO: Routing in-dialog NOTIFY <sip:cyvrphbz@192.98.103.1:60122;transport=tcp> from <sip:jh-buddies@test.fi> to <sip:192.98.103.1:47419;transport=tcp>

this does not depend on the pua patch nor which db_mode i have in rls
module.

-- juha

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd