HA SIP Load balancer
Author Image

By: Aivis Olsteins

In News

2019-02-13

SIP Load balancer on Cloud

Some thoughts about using Load Balancer when placing your SIP services on public cloud like AWS

Following up on the post about placing SIP services on public cloud like AWS, I am going to talk briefly about using load balancer. We will use OpenSIPS as an example again.

Advantages of using Load Balancer are quite obvious, but nevertheless, lets remember them:

  • Balancing of the load - obviously. You do not need to worry that some of the services might be overloaded while others are idling
  • Detecting failed gateway. It is common feature of most load balancers regardless of service type they balance (HTTP/HTTPS, other TCP, etc) to be able to constantly monitor their destination routes and proactively take them out or routing, put it back, and alert administrator
  • Easier maintenance. Operators can do updates on their backend systems by taking nodes out of routing one by one (rolling update) without interrupting services for the users
  • Security. Smaller attack surface - less machines exposed to the internet.

I cannot think about obvious disadvantages at the moment, except that of course any new new unit adds a bit more complexity in the system and requires some more knowledge and attendance.

For those interested in practical setup, here is a link to our documentation page which explains how to set up OpenSIPS as a Load Balancer with relevant routing script fragments explained.

OpenSIPS and similar Load balancer implementations make use of separate routing database. This allows to create a setup with one more significant feature - avoiding single point of failure. in such setup there are more than one loadbalancer instances (say, two) and each of them has a copy or routing database. both databases should be setup in a replication environment, however, with caution. Routing tables can be replicated, so that both balancers access same routing data, however, other tables, like dialog storage, can be kept separate for each balancer. This allows each one of the balancers fail, and the remaining one (ones) will have their copy of routing tables active at all times.

The only disadvantage of dual-load balancer setup is the management of hot swap. There are several ways how to solve this, but not all are ideal:

  • DNS failover. It is reliable method, however very slow, since DNS propagation can take hours if not days;
  • DNS Service records. Somehow difficult since not all devices support it;
  • Solutions which create a virtual address shared between several hosts. Might not be possible to set up in all cases;
  • Requiring clients to use two hosts at all times - most reliable method which usually fails only because users do not implement it.

To sum up, SIP load balancers are easy to set up, and provide a range of advantages for a SIP service of any size.

 

 

Leave a comment
About Author
Author Image
My name is Aivis Olsteins and I am owner of DataTechLabs. My experience in Telecoms started in early 1990's and I have worked in multiple technical positions in mobile, messaging and data networks. My expertise lies in telecom networks, database systems, distributed processing and large data analysis. These posts are my attempt to share my knowledge with everyone who might find it useful.

Get in Touch

If you have something to say, please use the contact form below to get in touch with us. We will get back to you as soon as possible.

Mail Us

DataTechLabs SIA, Muzikas str 12A
Jurmala, LV-2008, Latvia.

Call Us

+371 67 66 09 01
+ 1 202 499 1550

E-mail Us

info@datatechlabs.com
support@datatechlabs.com