[asterisk-dev] Multiple MySQL Database ‘Syncing’ Within an Asterisk Cluster
JR Richardson
jmr.richardson at gmail.com
Thu Jul 6 08:24:10 MST 2006
Just need to bounce this off of you guys, help get my mind right………….
Using the ARA gives the ability for multiple PBX's to pull info from a
MySQL database cluster. Clustering MySQL is pretty simple when using
mysql master/slave database replication and distributing the database
lookups across the database replication cluster.
This gives good database HA for MySQL but I'm running into an issue
specifically with the PBX-to-database write operation then followed by
the database replication.
MySQL server layout:
Master id:1 provisioning front end, human interaction
Slave1 id:2 hosting database for pbx 1, 2, 3
Slave2 id:3 hosting database for pbx 4, 5, 6
Slave3 id:4 hosting database for pbx 7, 8, 9
When we make changes to the Master, changes are immediately replicated
to all the slaves and the PBX's perform accordingly.
When PBX 1 registers a phone and updates the "full contact info" to
database Slave1 for that UA, we now need a sync operation from Save1
back to the database Master so the Slave2 and Slave3 remain in sync.
There are database sync utilities with MySQL but are accessed by
manually running the utilities. I'm looking for an automated solution
that will keep all these databases in 'sync' rather than just
replicated from one master.
Can ARA accomplish this by separating the read and write operations,
configuring the write operation to the Master database and configuring
the read operation to pull from another database? This functionality
would need to be added to sip/iax users/peer operation, something
like:
sip.conf
readdbname=slave1
readdbhost=10.10.10.11
readdbuser=asteriskdb
readdbpass=asteriskdbpassword
writedbname=master
writedbhost=10.10.10.10
writedbuser=asteriskdb
writedbpass=asteriskdbpassword
Any thoughts or ideas on how to accomplish will be greatly appreciated.
Thanks.
JR
--
JR Richardson
Engineering for the Masses
More information about the asterisk-dev
mailing list