[Asterisk-Users] Re: load balancing 20 asterisk servers

Miguel Ruiz Velasco Sobrino miguelrvs at yahoo.com.mx
Wed Feb 2 16:03:24 MST 2005


--- asterisk-users-request at lists.digium.com wrote:


> The DNS approach does not handle single or multiple system failures,
> only very elementary load balancing over a lengthy period of time.

Are you shure of that? I'm aware that the load criteria is trickier, but very possible.

If you use DDNS (dynamic DNS) using Bind 9. You have to run a health monitor (like a tcp
or ping monitor) in one server (like the dns one) if one server dies, a script removes
it's A record automagically from the pool, and even with a script that monitors the load
you can dynamically add and remove the entry of each individual server in the DNS server.
And you would not need to care if the load balancer sends the SIP stream to one server
and the RTP stream to an other or in the case of outgoing connections or whatever
extrange situation.

Use "nsupdate" utility for doing DDNS, it's really simple and incredibly powerfull. Also
because all the requests are digitally signed, you will likely don't have security
problems.

------------------------

> You may want to consider a simpler aproach, why don't you balance the load via DNS?
> If you put in a zone file various A records for the same machine, but with different
> IP's, BIND will catch the trick and send a different IP (from the pool yo defined) each
> time a DNS request arrives. That's a simple way of doing that, it will definively work
> for termination, but you may have to think more who to cope with origiation (outgoing
> calls), since different clients will be connected to different servers.
> 
> 
> --- asterisk-users-request at lists.digium.com wrote:

> 
> We use it on our web and mail server to load ballance across multiple 
> hosts. The way we have it configured
> it will maintain a session for 15 minutes between a client and a 
> specific server. So long as you have
> qualify=yes in your configuration files, each client will continue to 
> talk to the one server until they are turned off/
> deactivated for at least 15 minutes (or whatever time period you 
> configure into it). I've not tested LVS with
> Asterisk, but it may be the right direction for you to take.
> 
> Cheers,
> -Shaun
> 
> Matthew Boehm wrote:
> 
> >I've read several other emails and pages on the wiki but none give any
> >deffinate answers. if you have 20 asterisk servers each with 4 pri's, all
> >running RealTime Extensions and RealTime SIPBuddies from the same MySQL
> >server, what prevents you from putting all 20 servers behind a single load
> >balancer? That way all of your UA's can use the same IP to register to; vs
> >maintaining which customer is assigned to which machine.
> >
> >perhaps its just that i am not that familiar with load balancers. i was
> >under the impression that a load balancer could/would send each recieved
> >packet to a different server.
> >this doesn't matter in the case of register requests since all asterisk
> >boxes share same SIP registry database.
> >
> >but what about invite requests and the rtp stream? you would have a majorly
> >broken conversation if each packet in the rtp stream went to a different
> >asterisk box.
> >
> >or are load balancers SIP aware? or is there some sort of session control
> >that the balancer is aware of and will send all packets in a "sip session"
> >to the same asterisk box?
> >
> >and then what about meet me conferences? if 10 UA's all dial a conference
> >DID number and all 10 get balanced to 10 different servers then they are all
> >sitting in seperate rooms right?
> >
> >hints, opinions, facts...all welcome and appreciated.
> >
> >-Matthew




		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




More information about the asterisk-users mailing list