[asterisk-ha-clustering] New HA setup

Chris Mylonas chris at mrvoip.com.au
Mon Nov 2 20:56:13 CST 2009


Slow down tiger,

Take my advice with a grain of salt as I'm not a database guru.

Test your DB replication with the different setups to see what fits best for
your needs.

Some of them are simply mysql<--->mysql master/slave replication (like most
tutorials on the internet), some are block level replication  e.g.
http://docs.sun.com/source/mysql-refman-5.1/ha-overview.html

Master Master with heartbeat means there will be 1 ip address shared between
the two.  If the primary master fails, heartbeat takes over after 10 seconds
or whatever you configure it.  Asterisk will still be looking up on
'that-one-ip-address' and heartbeat will make sure there's a master database
for you to look up.  In this case it's the secondary master that has kicked
in with it's new IP address that asterisk expects to find.

Take an sqldump every hour from the slave, it can always catch up to the
master after the dump.  Best not to use the master - because of table
locking you'll end up with problems/complaints if someone is trying to
update, althouth that would depend on the size of your dataset.  We have
binary blogs in our databases for web content that the application uses, so
doing a mysqldump on the master is literally
suicide-*chink*-*chink*-your-wrists.

Your best to ask a real database expert though, as my experience is limited.

I do however recommend you test on amazon and break as much stuff as you can
because it's a very useful resource - being able to run up a server in a
couple of minutes.


Cheers
Chris



On Tue, Nov 3, 2009 at 12:35 PM, Frederic Jean <makafre at gmail.com> wrote:

> Hi Chris, thanks for the great tip.
>
> This means each Asterisk could be updated based on the 2 master databases.
>
> So to resume it all:
>
>
> - One master database is setup on its own server and all writing (inserts
> and updates) operations are done through it.
> - Second master database is replicated as in Chris comment (Master Master).
> Web data could be fetched from this server as well.
>
> - Each Asterisk server would need a local slave mysql database for all read
> statements.
> - Each Asterisk local slave database updates itself on a regular interval
> from the Masters using mysql_multi
>
> - Setup of a DUNDi lookup server (as in JR Richardson's "Using DUNDi with a
> cluster of Asterisk servers" paper).
>
> Is this something "standard" in a HA Asterisk solution? Has anybody tried
> something similar?
> Any comments are appreciated!
>
> Fred
>
>
>
> On Mon, Nov 2, 2009 at 7:14 PM, Chris Mylonas <chris at mrvoip.com.au> wrote:
>
>> Hi Fred,
>>
>>
>> I suggest running a few Amazon AWS servers for a few hours at 8.5c per
>> hour per server and do some testing.  It's the Master Master thing you want
>> on the HA servers with the DBs.
>>
>> MySQL slaves can only have 1 master.
>> You can get around this by using mysql_multi on the same host to run
>> several slaves (mysql servers on different PIDs & ports  i.e. 3307,3308,3309
>> etc.)
>>
>>
>> Hope this helps you a little bit,
>> Chris
>>
>>
>>
>>
>> On Tue, Nov 3, 2009 at 8:49 AM, Frederic Jean <makafre at gmail.com> wrote:
>>
>>>
>>> Hello all, I just joined the mailing list.
>>>
>>> I need to setup a HA * solution with 2 ultramonkey servers, 5 * servers
>>> and a realtime mysql data repository.
>>> It's my first time at doing such a setup after several years playing with
>>> Asterisk, so this is what I figured out
>>> up to now;
>>>
>>> - One master database is setup on its own server and all writing (inserts
>>> and updates) operations are done through it.
>>> - Each Asterisk server would need a local slave mysql database for all
>>> read statements.
>>> - Database replication would occur for each * slave on a regular
>>> interval.
>>> - Setup of a DUNDi lookup server (as in JR Richardson's "Using DUNDi with
>>> a cluster of Asterisk servers" paper).
>>>
>>> I really want to make sure that there is no SPOF in the solution.
>>>
>>> I am however not feeling confident about this database distribution, is
>>> that the way to go? How to add a hot/cold standby mysql server?
>>> Does this solution make sense? any suggestions or tips before going
>>> further?
>>>
>>> Best regards,
>>> Fred
>>>
>>>
>>> _______________________________________________
>>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>>
>>> asterisk-ha-clustering mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-ha-clustering
>>>
>>
>>
>>
>> --
>> ======================
>>
>> Chris Mylonas
>>
>> Web Systems Administrator
>> Omnium Research Group
>> College Of Fine Arts
>> University of NSW
>> www.omnium.net.au
>>
>> Communications, Internetworking, Software Design & Prototyping
>> Consultant
>> www.mrvoip.com.au
>>
>> Open Source Software Projects
>> Founder
>> www.opencsta.org
>> www.nursepaging.com
>>
>> ======================
>>
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-ha-clustering mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-ha-clustering
>>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-ha-clustering mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-ha-clustering
>



-- 
======================

Chris Mylonas

Web Systems Administrator
Omnium Research Group
College Of Fine Arts
University of NSW
www.omnium.net.au

Communications, Internetworking, Software Design & Prototyping
Consultant
www.mrvoip.com.au

Open Source Software Projects
Founder
www.opencsta.org
www.nursepaging.com

======================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-ha-clustering/attachments/20091103/47adb43c/attachment.htm 


More information about the asterisk-ha-clustering mailing list