Using a Sailfin Cluster (Load-balancing with a Simple INVITE Application)
By 143562 on Mar 16, 2009
This blog covers the following items:
Deploy a simple invite application on a sailfin cluster (Application provided).
Create the SIPp INVITE scenario file (Ready scenario file provided).
Run the SIPp scenario.
See that the requests are load-balanced.
Before You Start
a) Get SIPp installed on your machine. Get it from http://sipp.sourceforge.net/ .
b) To create the Sailfin Cluster see Quick Start with SailFin Clustering. Once the CLB enabled cluster is created you can follow the below steps to try it out.
Deploy a Simple INVITE Application on the cluster
Run asadmin deploy --target <cluster-name> <path-to-deployable-sar-file> at <sailfin-install-location>/bin
(Application source is available here. Deployable application sar file is available here. )
Create the SIPp INVITE scenario file
\* Get this invite.xml file available here.
\* Get the default uac scenario xml available from sipp (by running "sipp -sd uac >invite.xml) and modify it for use with sailfin.
Modifications required are:
- Replace the first <recv response="200" rtd="true"> with <recv response="200" rtd="true" rrs="true">
- Replace "ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0" with "ACK [next_url] SIP/2.0".
- Replace " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0" with " BYE [next_url] SIP/2.0"
Now run SIPp as follows
sipp -sf invite.xml -m <number-of-calls-you-want-to-create> -p <sipp-client-port-your-pick> <host-name-any-one-instance>:<sip-port-of-that-instance>
Use "sipp -sf invite.xml -m 10 -p 7000 sailfin-cluster-machine.india.sun.com:35060" to send 10 requests to an instance that is running on machine sailfin-cluster-machine.india.sun.com and whose sip port is 35060.
Now, to find the SIP port of an instance open the domain.xml at <sailfin-install-location>/domains/<your-domain-name>/config/domain.xml and search for the instance name. Look for the SIP_PORT system property information for that instance. If you don't find it then the default 35060 port is being used.
Checking that requests are being Load Balanced
From Admin UI:
a) Open Admin UI in the browser <hostname-of-machine-with-domain>:4848. Enter default username and password (admin/adminadmin)
b) Click the arrow next to “Clusters” on the left pane. Click the arrow next to “<Your-Cluster>”. Click on one of the instances.
c) Click on the “Monitor” tab. Click on “Call Flow” sub-tab. Check the “Enabled” check box to enable Call Flow Monitoring. Click on the “Save” button. Repeat this for each instance in your cluster.
d) Run the above SIPp command again on the command line.
e) Click on the “Refresh” button. Scroll down to check on the Call Flow Data table. Do this on the Call Flow screen of each instance to find that each instance has served some requests.
From Command Line:
a) Enable SIP module logging by running "./asadmin set <cluster-name>-config.log-service.module-log-levels.property.sip=FINE" .
b) Run the above SIPp command again.
c) Observe the server logs for all the instances.
These logs are available at <sailfin-install-location>/nodeagents/<agent-name>/<instance-name>/logs/server.log. Look for text "The first line" and you will find the SIP messages that are processed. You will find that requests are being processed by all instances.