 |
Call Fail Over Example:
NOTE: THIS DOCUMENT IS OUT OF DATE. IT APPLIES TO VERSIONS OF MOBICENTS PRIOR TO 1.0.GA. AS OF MOBICENTS 1.2 THERE IS A NEW HA DOCUMENT - http://groups.google.com/group/mobicents-public/web/mobicents-sip-balancer?hl=en
NOTE: There is an early access prototype of registrar failover. To try it see the ongoing discussion thread. It shows how once registered SIP clients can still call each other after a server failure.
This document outlines a scenario which demonstrates the High Availability of Mobicents.
Use Case
- Two instances of Mobicents running on different VMs and shared cluster
- Two SIP clients register with Server1
- Client A calls client B
- Client B answers. See Figure 1.
- Server1 crashes
- Server2 takes over transparently to both clients. See Figure 2.
- Call continues uninterrupted
- Client A hangs up to end the call
- The management interface of Server2 should be able to present the totall bill for the call.
Notes:
- To make the demo easy to test on one box, we will allow both servers to run on the same laptop but different VMs.
- There will be a simple front end load balancer, which sends heart beats to both servers and forwards requests only to active ones.
- For the demo it will suffice to have a UDP port forwarding listening on 5060 and routing requests to servers (host : port) specified in a property file.
- Initially the load balancer will always forward to Server1 while its alive and will switch to Server2 when Server1 is down.
- An extended demo would show two load balancers in front of the SLEE servers. One active and one in stand by mode, ready for IP takeover in case the active balancer fails. See Figure 3.
- Other future improvements of the load balancer will include mapping of Call ID to Server ID. This will achieve sticky SLEE session by convergence name.
How to start the proxy with the front end HA Forwarder
The front end HA proxy is really a limited stateless proxy server. It maintains a registration table of active proxy servers which register with it. The first live proxy server on the list is the current "hot" proxy server and others are replicas. To start the load balancer
- Start Mobicents and install the SIP Resource Adapter
- Start the Forwarder using ant runforwarder
- Install the proxy server ant sip-proxy-deploy
You will notice that the front end load balancer registers a proxy server in its list of live proxy servers. The port that the proxy server uses is not important. Messages are sent to the HA Forwarder and not directly to the proxy server.
Figure 1
Figure 2
Figure 3
Related Reading
The University of Columbia published a good paper on High Availability, Failover and Load Sharing: Download in PDF Format
-- Main.ivelin - 03 Jul 2005
|