[OpenSIPS-Users] Help!! How to do failover of mysql connection

Uwe Kastens kiste at kiste.org
Wed Nov 26 22:06:30 CET 2008


Hi Krunal,

> 
>     I am just on my way to implement the same. At the moment I am planing a
>     kind of Mysql Master - Master together with one VIP for
>     Mysql-opensips-communication. So for your example you will have to
>     mysql-servers. opensips is connection to lets say to 192.168.1.4
>     <http://192.168.1.4/> which
>     points on one of your mysql-servers. You will need active-active for
>     mysql since opensips will write some information in the database as
>     well.
> 
>      
> 
>      I am working with mysql-5 and heartbeat-2 in mode 1. Its nearly
>     working.
> 
> 
> Would you please explain it somewhat in detail?

Sure, at the moment its only a testing platform. I took two
MySQL-Servers which are configured as master-master. So writing on both
databases is possible and is synchronized. I found a good step-by-step
guide under:

http://www.howtoforge.com/mysql_master_master_replication

I configured a very simple setup for heartbeat to share one VIP between
both servers for client connection. So a kind of mysql-test is needed to
check if the database is online on the "normal" IP-Adress. If not the
VIP should be switched to the other server. I found a kind of
nagios_mysql_check usefull.

The openser-servers are connecting only to the vip address. Read and
Write are working on only one database. This should be enough for a
small environment.

Why no master - slave? I found it to complicate to make a slave to a
master by skript.

Why not the "normal" setup (drbd with mysql and heartbeat)? I looks to
complicated.

But! I have no idea how it will work in a real world.

BR

kiste
-- 

kiste lat: 54.322684, lon: 10.13586



More information about the Users mailing list