[SR-Users] Kamailio Cluster

Alex Balashov abalashov at evaristesys.com
Mon Feb 1 07:28:33 CET 2016


Hi Gholamreza,

Most Kamailio functionality can be used in an active-active way as long 
as there is a database persistence layer that can be shared among them:

In particular, since you asked about the registrar: you can use 
`db_mode` 3 with `usrloc` to achieve this persistence:

http://kamailio.org/docs/modules/4.3.x/modules/usrloc.html#usrloc.p.db_mode

That is to say, if multiple Kamailio instances are configured to use the 
same database with usrloc db_mode 3, then any of them can resolve any 
registration binding regardless of which actual proxy it was saved on.

That said, database-based sharing is certainly not the only approach, 
particularly to replication of registration contacts. A few others:

1) Replicate registration messages manually with t_replicate():

http://kamailio.org/docs/modules/4.3.x/modules/tm.html#tm.f.t_replicate

2) Use the `dmq` interprocess messaging bus to replicate the location 
table that way:

http://kamailio.org/docs/modules/4.3.x/modules/dmq_usrloc.html

So, it's fair to say this problem is amply solved in relation to the 
registrar functionality specifically.

If your question was more general: there is no generic Kamailio 
clustering concept that can continuously replicate all internal state 
across multiple proxy instances. In keeping with Kamailio's fairly 
low-level interior, you must choose and implement your own specific 
methodologies for this that are appropriate for the architecture and 
business rules of your applications and services.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list