Hi, I am designing a asterisk load balancing model as follow. There are 3 asterisks connected to a single DB and a single server storing all the configuration file and voicemail. Round Robin DNS will distribute the request to asterisks. DNS round robin ---+ asterisk1--------------------------+ DB and file server +---asterisk2-----------------------+ +---asterisk3-----------------------+ Does anyone has load balancing experience implemented in asterisk that can share? Does my design work? Does any conflict will happen in my design? Any comment? Thanks!
Unless you can guarantee that the system that is currently processing a call will be the system that handles a transfer request from a phone, are the same, then transfers will not work. Round robin DNS won't work at all. Every time you send out a SIP message, your going to be sending it to a different Asterisk box. For example, your initial INVITE will go to asterisk server 1. Asterisk server 1 will then send back a message requesting authorisation. Your phone does another lookup, and gets Asterisk server 2 this time. The phone sends the new INVITE with the auth info to Asterisk server 2. Asterisk server 2 will probably be ok with this, but when it sends a TRYING back to the phone, depending on the phone you are using, everything will fall in a heap on the floor. I know polycoms do. They get this TRYING from an asterisk server they didn't send and they go 'huh?'. I'm sure most other stuff will fail too. The Asterisk boxes share no state information. Doug. -----Original Message----- From: unplug [mailto:maillisting@gmail.com] Sent: Fri 6/16/2006 9:41 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: [Asterisk-Users] asterisk load balance Hi, I am designing a asterisk load balancing model as follow. There are 3 asterisks connected to a single DB and a single server storing all the configuration file and voicemail. Round Robin DNS will distribute the request to asterisks. DNS round robin ---+ asterisk1--------------------------+ DB and file server +---asterisk2-----------------------+ +---asterisk3-----------------------+ Does anyone has load balancing experience implemented in asterisk that can share? Does my design work? Does any conflict will happen in my design? Any comment? Thanks! _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
That sounds fine except where registrations are involved although I'd suggest you look into SRV as well as RR for the DNS to more finely balance the load for clients which support it. Doug's mail says it all where registrations are involved - not all state information is stored in the database so you need to ensure that incoming and outgoing traffic for a given user is hitting the asterisk box with which they've registered. Simon On 6/17/06, unplug <maillisting@gmail.com> wrote:> > Hi, > I am designing a asterisk load balancing model as follow. There are > 3 asterisks connected to a single DB and a single server storing all > the configuration file and voicemail. Round Robin DNS will distribute > the request to asterisks. > > DNS round robin ---+ asterisk1--------------------------+ DB and file > server > +---asterisk2-----------------------+ > +---asterisk3-----------------------+ > Does anyone has load balancing experience implemented in asterisk that > can share? Does my design work? Does any conflict will happen in my > design? Any comment? > Thanks! > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060617/6e05041d/attachment.htm
Good grief I hate Outlook webmail. I can't reply inline. Anyway, I disagree that all state info except hinting can be replicated. What about call transfers? If a call is sitting on pbx1, and the user transfers a call, if it goes to pbx2, Asterisk will complain that it cannot transfer the call as it doesn't know anything about it -----Original Message----- From: Aaron Daniel [mailto:amdtech@shsu.edu] Sent: Fri 6/16/2006 11:57 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: RE: [Asterisk-Users] asterisk load balance On Fri, 16 Jun 2006, Douglas Garstang wrote: > Unless you can guarantee that the system that is currently processing a call will be the system that handles a transfer request from a phone, are the same, then transfers will not work. Incorrect. Transfers work fine between multiple asterisk boxes. > Round robin DNS won't work at all. Every time you send out a SIP message, your going to be sending it to a different Asterisk box. For example, your initial INVITE will go to asterisk server 1. Asterisk server 1 will then send back a message requesting authorisation. Your phone does another lookup, and gets Asterisk server 2 this time. The phone sends the new INVITE with the auth info to Asterisk server 2. Asterisk server 2 will probably be ok with this, but when it sends a TRYING back to the phone, depending on the phone you are using, everything will fall in a heap on the floor. I know polycoms do. They get this TRYING from an asterisk server they didn't send and they go 'huh?'. This is entirely phone dependant, and usually the phones that "fall in a heap" (like the phrase much?) also handle secondary server configurations MUCH better than the phones that don't. Polycoms and sipura's handle SRV and backup server settings better than cisco's, but cisco's won't jump from server to server. > I'm sure most other stuff will fail too. The Asterisk boxes share no state information. It's all in how you program the dial plan. The main thing that doesn't share state information that may cause problems is hinting. Everything else is programmable somewhere in the system :) > -----Original Message----- > From: unplug [mailto:maillisting@gmail.com] > Sent: Fri 6/16/2006 9:41 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Cc: > Subject: [Asterisk-Users] asterisk load balance > > > > Hi, > I am designing a asterisk load balancing model as follow. There are > 3 asterisks connected to a single DB and a single server storing all > the configuration file and voicemail. Round Robin DNS will distribute > the request to asterisks. > > DNS round robin ---+ asterisk1--------------------------+ DB and file server > +---asterisk2-----------------------+ > +---asterisk3-----------------------+ Your design would work just fine as long as you have your dialplan is configured right. Keep in mind though that if asterisk1 dies, you just lost your db. > Does anyone has load balancing experience implemented in asterisk that > can share? Does my design work? Does any conflict will happen in my > design? Any comment? > Thanks! > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- Aaron Daniel Computer Systems Technician Sam Houston State University amdtech@shsu.edu (936) 294-4198 _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
According to Kevin Fleming, this is not supported. -----Original Message----- From: unplug [mailto:maillisting@gmail.com] Sent: Tue 6/20/2006 10:03 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] asterisk load balance I am confusing where the asterisk should store the register information in realtime mode. As in my configuration, UA1 ---- asterisk1 + UA2 ---- asterisk2 + database UA3 ----- asterisk3 + 3 UAs connected to 3 asterisk with a common database to store user information and dial plan. However, asterisk1 seems doesn't know there are UA2 and UA3 already registered in the system. I wonder the register information should be store in DB. When there is a invite request, asterisk will query the database and find out the calling party contact information. Am I right? But in the case above, asterisk only know the UA which register to it. Anyone can tell me the real mechanism of realtime for the UA registration? How and where asterisk to get the user registration when there is an invite comming? On 6/18/06, Aaron Daniel <amdtech@shsu.edu> wrote: > On Sat, 17 Jun 2006, Douglas Garstang wrote: > > > Good grief I hate Outlook webmail. I can't reply inline. > Switch to thunderbird ;) > > > > > Anyway, I disagree that all state info except hinting can be replicated. What about call transfers? If a call is sitting on pbx1, and the user transfers a call, if it goes to pbx2, Asterisk will complain that it cannot transfer the call as it doesn't know anything about it > > Well, I'm not sure what the problem with call transfers is. We have two > registration servers, in which the phones can and do register with either > server. If one phone makes a call on one server, they can complete the > call with anyone else on their server, plus anyone on the other servers. > The server just treats the transfer and bridge like any other phone call. > If the phone is on another server, it hands off the conversation to that > server after the transfer. > > And I think I'll address your NFS problems. Are you doing that for > redundancy's sake or just for MWI? If it's just for MWI, then you might > be better off setting up some scripts that drop some msgXXXX.txt files in > the user's "voicemail" box on the registration servers. No need to > replicate registration to the voicemail server, that's just extra unneeded > traffic. Plus, with something like that, you don't have to worry about > the voicemail nfs share dying and bringing down the asterisk network. If > it's for redundancy, set up another voicemail server or two, and use DRBD > or some sort of sync tool between them, with the MWI script and you'll > have fixed the redundancy problem. > > > -- > Aaron Daniel > Computer Systems Technician > Sam Houston State University > amdtech@shsu.edu > (936) 294-4198 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Hi all, I just search for the Load Balance and HA solution for the Asterisk servers. I visited http://www.vovida.org/ and there is a Load Balancer. Did anyone try that application? If yes, please give comment about it.