[asterisk-users] High Availability with Asterisk

Chris Bagnall asterisk at lists.minotaur.cc
Thu Mar 6 12:56:17 CST 2014

On 6/3/14 3:21 pm, Thorolf Godawa wrote:
> The idea would be having a HA-cluster of two servers with Xen, each of
> them runs one instance of an Asterisk-system in a single VM and on a
> failure the VM will be restarted on the other node.
> This might result in a much higher load on this node, because is runs
> two VMs, but for a short period, until the other node comes back again,
> it might be tolerable.

This is basically what we do, though in our case we use KVM rather than 
Xen; we found KVM behaved a great deal better managing timing than Xen, 
but YMMV and Xen may well have come along a great deal since we last 
looked at it.

In fact, it could be argued that even without any need for HA, there's 
still an advantage to running a server in a VM: hardware portability. If 
the machine dies, you can quickly redeploy the VM to a new host without 
having to recompile things and so on because hardware has changed.

> Are there other options running two Asterisk-instances parallel on one
> system, each binded on it's own IP, maybe s.th. with chroot or similar?

You might be able to do something interesting with containers (LXC), but 
given the ease of setting up KVM and the (relatively) small performance 
overhead, we've tended to just stick with that.

On 6/3/14 3:46 pm, Michelle Dupuis wrote:
> A lot of HA tools don't look deeper into Asterisk to see if/how it has failed (they only detected catastrophic failures).  What happens when the Asterisk process is alive but no longer bridging calls?

In fairness, the tools the OP mentioned (pacemaker/corosync) can be set 
up to detect other failures than whether asterisk is alive - a simple 
one to set up is to try connecting on 5060 UDP and make sure you get an 
acknowledgement. Likewise, you could even set up a call using the 
manager interface to a dummy extension and make sure it completes 

FWIW, we tend to use pacemaker with heartbeat rather than corosync, but 
both perform a pretty similar function.

Kind regards,

This email is made from 100% recycled electrons

More information about the asterisk-users mailing list