1

I have several Asterisk boxes and 2 kamailio servers (both for failover) loadbalancing calls between Asterisk boxes. Kamailio server receives calls from E1 to SIP gateways, and then forwards the call to the Asterisk cluster. There is no NAT, and the platform only processes inbound calls.

At this point, load balancing for Asterisk servers is OK: Asterisk cluster handles several thousand simultaneous calls without any problem, and if i want to have more calls, i "just" need to setup a new Asterisk server and set its IP address to Kamailio's dispatcher. Regarding Kamailio, the failover cluster (if we can call it cluster, as there are only 2 serves) works perfectly.

But as any high-tech solution, there are limits: we cannot grow the Asterisk cluster indefinitely, so at some point, we'll need to add more Kamailio servers. Knowing that the E1-to-SIP gateway redirect calls to only 1 IP address (the kamailio cluster address), question is:

How can we add any number of new Kamailio servers to thep platform, and load-balancing SIP requests between kamailio cluster?

"grosso-modo", how to load balance load balancers? :)

I thought about Kamailio + LVS integration. Any clues, anyone?

Kara
  • 6,115
  • 16
  • 50
  • 57
scharrua
  • 73
  • 2
  • 5

1 Answers1

1

You have following choices

1) "root" kamailio with 301 redirect setup, which just redirect inbound calls to set of kamailio

2) dns which return always different ip. Clients have return dns

3) http://www.lartc.org/autoloadbalance.html

4) cisco router or iptables setup similar to lartc(just forward port random order to different ips)

But please note following: if you have so large load that single!! kamailio server can't do that - you dooing something wrong or you need hire expert at this stage.

Single kamailio server can easy serve upto 7000 calls per second.

arheops
  • 15,544
  • 1
  • 21
  • 27