[asterisk-ha-clustering] load balance register on two or more servers

ronald nhadie at gmail.com
Tue Aug 19 04:49:04 CDT 2008


i tried to follow this instruction:

http://blog.iclutton.com/2008/01/load-balancing-and-high-availablity.html

but i changed the config to

virtual=103.222.18.155:5060
         # first real server ip address, port, forwarding mecahnism, 
weight. masq -> NAT
         real=103.222.18.130:5060 masq 1
         # second real server ip address, port, forwarding mecahnism, 
weight. masq -> NAT
         real=103.222.18.131:5060 masq 1

then i tried my phone to register on 103.222.18.155

i looked t the sniff i always get these:

U 103.222.18.130:5060 -> 103.222.18.156:32770
   SIP/2.0 404 Not Found..Via: SIP/2.0/UDP 
103.222.18.156:32773;branch=z9hG4bKhjhs8ass877;received=103.222.18.156..From: 
<sip:ldirectord at dev-server-2>;tag=
   1928301774..To: 
<sip:ldirectord at dev-server-2>;tag=as58e3ee79..Call-ID: 
a84b4c76e66710..CSeq: 63104 OPTIONS..User-Agent: Asterisk PBX..Allow: 
INVITE, ACK
   , CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: 
replaces..Accept: application/sdp..Content-Length: 0.... 

#
U 103.222.18.156:32773 -> 103.222.18.131:5060
   OPTIONS sip:ldirectord at dev-server-2 SIP/2.0..Via: SIP/2.0/UDP 
103.222.18.156:32773;branch=z9hG4bKhjhs8ass877..Max-Forwards: 70..To: 
<sip:ldirectord at dev-
   server-2>..From: 
<sip:ldirectord at dev-server-2>;tag=1928301774..Call-ID: 
a84b4c76e66710..CSeq: 63104 OPTIONS..Contact: 
<sip:ldirectord at dev-server-2>..Acc
   ept: application/sdp..Content-Length: 0.... 
 

#
U 103.222.18.131:5060 -> 103.222.18.156:32770
   SIP/2.0 404 Not Found..Via: SIP/2.0/UDP 
103.222.18.156:32773;branch=z9hG4bKhjhs8ass877;received=103.222.18.156..From: 
<sip:ldirectord at dev-server-2>;tag=
   1928301774..To: 
<sip:ldirectord at dev-server-2>;tag=as2e6c3f7f..Call-ID: 
a84b4c76e66710..CSeq: 63104 OPTIONS..User-Agent: Asterisk PBX..Allow: 
INVITE, ACK
   , CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: 
replaces..Accept: application/sdp..Content-Length: 0.... 

#
U 103.222.18.156:32773 -> 103.222.18.130:5060
   OPTIONS sip:ldirectord at dev-server-2 SIP/2.0..Via: SIP/2.0/UDP 
103.222.18.156:32773;branch=z9hG4bKhjhs8ass877..Max-Forwards: 70..To: 
<sip:ldirectord at dev-
   server-2>..From: 
<sip:ldirectord at dev-server-2>;tag=1928301774..Call-ID: 
a84b4c76e66710..CSeq: 63104 OPTIONS..Contact: 
<sip:ldirectord at dev-server-2>..Acc
   ept: application/sdp..Content-Length: 0.... 
 

#

am i missing anything?

regards,
ronald




ronald wrote:
> Hi,
> 
> What is the basic thing i need to load balance users registering on the 
> server?
> 
> i have 2 asterisk using realtime, i just need to simply update my dns 
> not to use round-robin so i will point my domain to a single IP (i know 
> you are wondering y, but i made a mistake on using dns round-robin on my 
> web application and i'm losing session when a user logs in because of 
> it, so i have load balance apache using mod_proxy now i need to load 
> balance asterisk) i know it's confusing but for now my goal is to load 
> balance the registration of users, if i do load balance on register, 
> will invite be affected? or the load balancer should just simply forward 
> it to the asterisk?
> 
> thank you
> 
> regards
> ronald
> 
> 
> _______________________________________________
> --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
> 



More information about the asterisk-ha-clustering mailing list