Dialogic Blog

How to Scale Your SIP Applications: Step-by-step Guide

by Vince Puglia

Jun 16, 2016 10:10:27 AM

Scaling SIP services can be tough, but it shouldn't be. Follow this ‘how-to’ guide or video (at the bottom of the post) to get your load balancer working in 10 minutes or less. 


Oh how I wish this statement were always true: 

if (one call works) then (multiple calls will work too)

Unfortunately, it’s not always that easy when dealing with real-time communication applications as they have unique characteristics, which can directly affect scalability. What do I mean by that? – Take for instance SIP, which inherently is a chatty protocol requiring a high level of transactions-per-second. The chattiness can range from a basic three-way handshake for INVITE to periodic INFO update messages – point being, each SIP message needs to be handled properly by the application. To properly handle will require some level of processing with finite processing per server that will impose scalability restrictions on your application. That is why we purpose built the PowerVille™ LB load balancer from the bottom-up to not only handle a high rate of real-time transactions but also to do it intelligently with service aware routing and seamless high-availability failover. Couple that with an intuitive streamlined webUI and the PowerVille™ LB will be one of the easiest experiences you’ll ever have.

How to Scale Your SIP Applications

This is part 1 of a multi-part ‘how-to’ series that will cover the basic installation of the PowerVille LB binaries along with configuring and testing your first SIP service. Spoiler alert: This ‘how-to’ will be the longest of the series given the need to install the binaries. All subsequent guides implementing other services will be wicked easy and short.

Be sure to reach out to me if you have any questions about the ‘how-to’ or the product.

//Vince

@vfpuglia

Vincent.Puglia@dialogic.com


Prerequisities: 

 

Overview and IP address assignments:

The below diagram is a high-level visual of the components being used for this ‘how-to’ including the LinPhone soft SIP client for generating calls, the PowerVille LB and (2) PowerMedia XMS servers. I’ve left the IP address assignments from my setup unchanged but obviously your setup can use any IP scheme you’d like.

pic1.png

PowerVille LB Install Instructions:

KEY:

Yellow highlight indicates input required

Green highlights useful information

 

1.) First you’ll need to download the PowerVille LB binaries by first requesting a trial copy HERE

Note - for this 'how-to' the GA version of the PowerVille LB was v1.3.15

2.) Once you’ve received the link and downloaded, copy the load balancer .jar file to your CentOS server (root or tmp directory is fine)

3.) Log into your load balancer instance via SSH and change directory to where to you uploaded the load balancer .jar file.

4.) Run the installer script and follow the prompts for installation: 

[root@loadbalancer-vfp ~]# java -jar dialogic-lb-installer-1.3.15.jar 

Please enter the location of your Java JRE install that will be used to run the Load Balancer [/usr/bin/java]

[enter for default]

The list of available IP Addresses are as follows:

192.168.1.138

Please enter your IP Address that the Load Balancer will use for management traffic. [192.168.1.138]

[enter for default]

The Load Balancer needs to send and receive VIP request/ responses via a specific interface. Available interfaces are listed below:

eth0

Please enter the name of the interface you would like the Load Balancer to send and receive VIP request/ responses from the list [eth0] :

[enter for default] 

Please enter a Multicast Base Address [default:228.8.8.0] :

[enter for default]

press 1 to accept, 2 to reject, 3 to redisplay

1

Select target path [/opt/nst-loadbalancer]

[enter for default]

The directory already exists and is not empty! Are you sure you want to install here and delete all existing files?

Press 1 to continue, 2 to quit, 3 to redisplay

1

* Press 1 if you would like to create a new installation of the Jetty web server

* Press 2 if you would like to install the Load Balancer Admin UI within an existing Jetty instance

1

Please enter a path where you would like to install the jetty web server [default: /opt/nst-loadbalancer ] :

[enter for default]

Select the packs you want to install:

[<required>] LB (The Load Balancer base Installation files)

...pack selection done.

press 1 to continue, 2 to quit, 3 to redisplay

1

[ Starting to unpack ]

[ Processing package: LB (1/1) ]

[ Unpacking finished ]

Install of the Load Balancer successfully complete.

The Load Balancer has been installed at the following location - /opt/nst-loadbalancer

You can now view the web admin ui at the following URL:

http://192.168.1.138:8888/lb  

Login details are as follows

Username : root

Password : admin

[ Console installation done ]

  

PowerVille LB Configuration Instructions:

1.) Open the load balancer web UI – http://192.168.1.138:8888/lb

Login using default username and password: root/admin 

2.) If the install was successful, the load balancer status should turn green. Click the ‘unlock config’ button at the top right to proceed with the configuration.  

3.) First add an ‘interface’ by clicking ‘provisioning -- > interface’ on the left hand side. Then click ‘add’. Leave the default ‘eth0’ interface. Finish by clicking ‘add’

Note: My ethernet interface was 'eth0' but yours may be different based on the CentOS install. 

step-3.png

4.) Next add a ‘Service Node’ by first clicking ‘provisioning à Service Node’ on the left hand side. Then click ‘add’. For the ‘address’ input the IP addresses of the PowerMedia XMS server (or the SIP endpoint you are sending traffic to). Finish by clicking ‘add’. Repeat the process for the second PowerMedia XMS server or SIP endpoint.

Note: My PowerMedia XMS IP address were assigned: 192.168.1.102 & 192.168.1.105 

5.) Add a ‘Service VIP’ by first clicking ‘provisioning à Service VIP’ on the left hand side. Then click ‘add’. For the ‘address’ input the IP addresses for the inbound virtual IP address (IB-VIP) which will handle in incoming SIP traffic assigned. Finish by clicking ‘add’. Repeat the process for the second outbound virtual IP address (OB-VIP), which will be sending the SIP traffic to the endpoints.

Note: My IB-VIP address was assigned: 192.168.1.188 and my OB-VIP address was assigned 192.168.1.238

6.) Now that you've defined your ethernet interface, the service nodes and service virtual IP addresses, it's time to build the SIP load balancer service. First click 'services' on the left hand side. Once on the 'services' page, click 'add services' at the bottom.  

 

7.) Give your SIP load balancer service a name and leave the default type to be 'SIP (Stateless)'. Click 'next' to continue. 
 

8.) Next is the LB Service Configuration for the SIP service. On this page, you can configure ports, routing options logging, etc. For this 'how-to' we'll only be changing the 'Inbound VIP Bind Address' and 'Outbound VIP Bind Address' created in step 5. Click ‘next’ to continue. 

9.) Next we need to link the defined nodes (SIP endpoints) to the SIP service by first by clicking ‘configure’ on the right hand side.

 

10.) At the 'configure nodes' page, click ‘add’. Select the ‘address’ to be the IP address of the first PowerMedia XMS (or other SIP endpoint). Repeat the process for the IP address of the second PowerMedia XMS. Click ‘add’ then ‘save’ to continue


11.) If added and configured correctly, the ‘sip_lb’ service should change to green indicating your SIP service is ready and the SIP endpoints are available. 

Testing your loadbalancer SIP service:

 1.) Test the new SIP load balancer service by first opening your SIP phone and make a call to:

sip:annc@192.168.1.188;play=file://verification/greeting.wav;

Note - replace the @ IP address with the Inbound VIP assigned to your setup

Make sure audio has been established.

End the call and make the call again – the second SIP endpoint / PowerMedia XMS should now be receiving the call. 

CONGRATS - YOU'RE DONE!!

Liked this post? Get more content like this right to your inbox. Subscribe to  the blog.


Follow along the tutorial with Vince Puglia in this video: 

Topics: Communications Application Development