One Asterisk Server with two realtime Databases

does asterisk realtime support that one ASTERISK SERVER is connected with two realtime database on different boxes in such a way that if primary server goes down my asterisk box should use secondary server .
As per my knowlge i think it does not support if it support then how should i configure my res_mysql.conf…Any help would be highly appreciated.


Nope, it definately doesn’t.

Your best bet to do this is to use an LVS Cluster. Basically you run 2 MySQL databases set to “Mirror” mode or “Master Master”

Then you setup an LVS server in front of the 2 databases which checks every few seconds to see if your MySQL database is up and running using the keepalive scripts. (Don’t let the name fool you, it’s used for clustering)

You then set it in the priorities that if MySQL DB1 goes down it automatically switches to MySQL DB2. You can even have a 3 and 4…

And because of the mirroring (master master) you did at the start the databases will remain consistant in their data no matter if your using DB 1 or DB 2.

Hope this helps. Sounds complex doesn’t it? But I suppose realtime redundancy comes at that cost.

Chris. C. (