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

Pablo Hernan Saro pablosaro at gmail.com
Tue Nov 25 18:51:36 CET 2008


You can set up your environment for restricting the primary server to not
come back up until it get synchronized.
Krunal, could you explain your needs a little bit more? What kind of links
do you have between boxes?
Why are you thinking in a fail over solution?
Feel free to contact me in pvt, this may become boring for the list.
Note that cluster and fail over are not the same.

Pablo

On Tue, Nov 25, 2008 at 1:11 PM, Brett Nemeroff <brett at nemeroff.com> wrote:

> You're going to have all sorts of data concurency problems doing any of
> this. Think about what happens as you get failures on one box and you start
> using the other.. The data will change on one and not the other.. then the
> primary comes back up.
> You really need a DB failover solution and clustering is really the right
> way to do it.. I did this with MySQL Master/Slave replication for years.
> Although it works, there are still problems using the backup mysql server.
> Namely, you can't really be entirely sure it's accurate data. And then when
> the primary comes back online, you'll have CDR in the backup that isn't in
> the primary. All sorts of problems like that..
>
> Now if you are just doing something simple like LCR routes, or simple
> lookups that are static, consider using something like dbtext instead as it
> doesn't need a mysql running process to operate.
>
> That's my $0.02. I'm sure there are others that used the master/slave type
> replication with success, but I think it's less than ideal. Just remember,
> it will look like a *perfect* solution for you, until you get a DB failure.
> -Brett
>
>
> On Tue, Nov 25, 2008 at 8:20 AM, Matteo D'Amato <matteo at ecosma.com> wrote:
>
>>  With SRV, if one box is down will it still get hit or does the DNS only
>> send to the one that is up?
>>
>>
>>
>>
>>
>> *From:* users-bounces at lists.opensips.org [mailto:
>> users-bounces at lists.opensips.org] *On Behalf Of *Pablo Hernan Saro
>> *Sent:* Tuesday, November 25, 2008 8:04 AM
>> *To:* Krunal Patel
>> *Cc:* users at lists.opensips.org
>> *Subject:* Re: [OpenSIPS-Users] Help!! How to do failover of mysql
>> connection
>>
>>
>>
>> That will not work. Try DNS SRV. Take a look at this link
>> http://www.zytrax.com/books/dns/ch8/srv.html
>> Hope it helps.
>>
>> Pablo
>>
>> On Tue, Nov 25, 2008 at 2:51 AM, Krunal Patel <krunal.lists at gmail.com>
>> wrote:
>>
>> Hi,
>>
>> is it fine if I use DSN resolver?
>> Let me explain in detail:
>> I setup a DSN resolver & add A record for mysql servers.
>> mysql         A          192.168.1.5
>> mysql         A          192.168.1.6
>>
>> where 192.168.1.5 & 192.168.1.6 are mysql cluster nodes.
>>
>> So mysql.somedomain.com will point to both servers.
>> It will do load balance & failover both.
>>
>> Please confirm that it will not create any issue.
>>
>> Thanks,
>> Krunal Patel
>>
>>
>>
>> On Tue, Nov 25, 2008 at 1:35 AM, Geoffrey Mina <geoffreymina at gmail.com>
>> wrote:
>>
>> This problem has been solved many times.  The absolute most bomb-proof
>> MySQL failover solution involves a combination of DRBD  and Linux HA
>> (Heart Beat).  The replication model has too many issues IMO.
>>
>>
>>
>>
>>
>> On Sun, Nov 23, 2008 at 9:10 AM, Uwe Kastens <kiste at kiste.org> wrote:
>> > Hi Krunal,
>> >>     * I am having 2 MySql servers. Lets say 192.168.1.5
>> >>       <http://192.168.1.5> & 192.168.1.6 <http://192.168.1.6>
>> >>     * Opensips is at 192.168.1.4 <http://192.168.1.4>.
>> >>     * I would like to use 192.168.1.6 <http://192.168.1.6> mysql
>> server
>> >>       for failover.
>> >>     * I mean to say if 192.168.1.5 <http://192.168.1.5> goes down then
>> >>       opensips should start to use 192.168.1.6 <http://192.168.1.6>
>> >>       mysql server.
>> >>
>> >
>> > 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 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.
>> >
>> > BR
>> >
>> > Kiste
>> >
>> > --
>> >
>> > kiste lat: 54.322684, lon: 10.13586
>> >
>>
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081125/e9b5ce3d/attachment.htm 


More information about the Users mailing list