Are you perhaps getting Kamailo's db_cluster
module confused with Galara's clustering? Kamailio's db_cluster module works as an abstraction for SQL connections - there's no explicit technical need for the actual DBs in the connection to be synchronized
(you almost certainly would WANT them to be synchronized, but the module itself doesn't care). I have several situations where I connect to multiple SQL replicas (in some cases mysql, in other cases postgres) with the intent that there is a primary and secondary
DB. This is just basic SQL replication. The Kamailio config looks like this:
## Define all of the individual connections for the cluster:
modparamx(
"db_cluster",
"connection",
"primary=>mysql://$def(DB_USER):$def(DB_PASS)@$def(DB_HOST)/$def(DB_DATABASE)"
)
modparamx(
"db_cluster",
"connection",
"secondary=>mysql://$def(DB_USER):$def(DB_PASS)@$def(DB_BAK_HOST)/$def(DB_DATABASE)"
)
## Define the cluster. List each connection and its priorities. In this
## case the reads preferring primary (9s), but will fall back to the secondary
## and the writes are ONLY to the primary:
modparam("db_cluster", "cluster", "db=>primary=9s9s;secondary=8s0s")
## Use the DB cluster anywhere a "db_url" mod param is used:
modparam("permissions", "db_url", "cluster://db");
I'm not using the sca module, but it has a
db_url parameter, and I would expect it could be used exactly like this. If this is what you're doing and it's not working, what error are you getting?
Kaufman
Senior Voice Engineer
E: bkaufman@bcmone.com
|
SIP.US Client Support: 800.566.9810
| SIPTRUNK Client Support: 800.250.6510 | Flowroute Client Support: 855.356.9768
|
|
|
|
|
From: mauro.celli76--- via sr-users <sr-users@lists.kamailio.org>
Sent: Thursday, May 29, 2025 7:11 AM
To: sr-users@lists.kamailio.org <sr-users@lists.kamailio.org>
Cc: mauro.celli76@gmail.com <mauro.celli76@gmail.com>
Subject: [SR-Users] Sca in cluster/load balancer
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
We have two kamailio in load balancing, mysql is in cluster mode with galera.
We need to use sca, but kamailio db_cluster is not supported (i need to specify connection string to sql not cluster name) and if phone1 is registered on kamailio1 and phone2 on kamailio2, sca not work. It is possibile to implement cluster?
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!