[Asterisk-Users] looking for failover ideas

Benjamin Lawetz blawetz at teliphone.ca
Tue Aug 23 11:49:01 MST 2005


We're currently working on a SIP load-balancing system using ipvsadm and so
far it seems to work pretty well.

We load balance the port 5060 registration (tracking the connection for a
little more time than the registration retry so that it goes back to the
same server) using tunneling.

So a packet generated from a client is sent to the load balanced IP (ex.
192.168.1.100) the load balancer sees it as a new connection and sends it to
the server with the least amount of connections (Ex. 192.168.1.103).
192.168.1.103 received the packet on it's tunnel interface. Answers back
directly to the client (as coming from 192.168.1.100). Client answers back
to 192.168.1.100 and gets sent to the same server.

The actual RTP is not load-balanced and passes directly between client and
real server.

If I recall there was a little piece of magic with iptables to DNAT (because
asterisk answered as coming from the real server... I'll have to check what
it was.. Going from memory here)

This seems to work well for the moment (using 1.0.9). Each server has all
the devices configured and when someone calls for a specific device, we dial
the device on our own server and call the device on the other server
(special inter-server context)

On the load-balancing machine, there is a monitoring (for the moment, just
testing the port) on the asterisk service and on the pingability of the
server using mon. If one of the servers goes down, it is automatically taken
out of the load-balancer.

Balances the load, and provides failover (using heartbeat for failover of
the load-balancing machine.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Garth van
Sittert
Sent: August 23, 2005 1:58 PM
To: anish at softelinc.com; Asterisk Users Mailing List - Non-Commercial
Discussion
Subject: Re: [Asterisk-Users] looking for failover ideas

I have had an idea of using two identical servers:  Server A with IP x.x.x.a
and server B with IP x.x.x.b.  Server A is live while server B sits in the
background monitoring server A.  Server B rsync's asterisk config files
daily with server A.
In the event of server A going down, server B changes it's IP to x.x.x.a.
The calls will obviously drop, but should register with server B.

Comments???


Anish Basu wrote:

>We are building asterisk clusters using mysql replication.  All the 
>configuration and cdr data is stored using the res_mysql module.
>Replication creates identical servers.  Then, the phones register to 
>each server using DNS SRV records.  If any server goes down, all the 
>phones registered to that server will register to any of the remaining
servers.
>The only downside of this is that all active calls get dropped once the 
>server goes down, but users can make and receive new calls instantaneously.
>
>Another idea is to use Asterisk Realtime so that the mysql replication 
>will share registration information between servers, thus eliminating 
>the need for the phones to re-register.  Has anyone successfully 
>implemented this or something similar?
>
>--Anish
>
>Message: 8
>Date: Tue, 23 Aug 2005 08:33:03 -0700 (PDT)
>From: "Jeremy C. Reed" <reed at reedmedia.net>
>Subject: [Asterisk-Users] looking for failover ideas
>To: Asterisk-Users at lists.digium.com
>Message-ID: <Pine.NEB.4.62.0508230821430.639 at pilchuck.reedmedia.net>
>Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
>I found many mailing list threads and one wiki webpage with ideas and 
>questions related to failover and high availability solutions.
>
>Is there any webpage or wiki page that summarizes all these ideas?
>
>What I have found:
>
>- case 1: two identical Asterisk boxes with one acting as hot-failure 
>backup
>http://www.voip-info.org/tiki-index.php?page=Asterisk+failover+case1
>
>- low tech DPDT relay
>http://www.voip-info.org/tiki-index.php?page=Asterisk+failover
>
>- VRRPD (KeepAlive daemon)
>
>- Linux-HA and DRBD and heartbeat monitoring
>
>- many mailing list postings with partial ideas
>
>Should I ask the asterisk docs list instead?
>
>  Jeremy C. Reed
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>  
>
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users






More information about the asterisk-users mailing list