2-server Linux cluster High Availability

I am running Asterisk 1.4.18.1 on a Linux server (CentOS Release 5). I have about 200 phones connected. This is running fine.
I am using FreePBX PBXIAF interface, and have billing information which is vital for every phone call in mySQL database.

For reliability, I want to cluster a 2nd server so that if one goes down the other one takes over. It should take over so that ongoing phone call does not even get interrupted.

I need help on:

  • how to cluster two Linux servers (Linux Virtual Server project?)
  • how to run Asterisk on both in a way that shares / replicates the billing information database, so if one server goes down, nothing gets lost.
  • how to implement that the system will not even interrupt an ongoing phone call if one server is going down.

Hi

Similar to this
cyber-cottage.co.uk/site/index.p … 4&Itemid=1

Details on heartbeat installation is here.

cyber-cottage.co.uk/wiki/ind … =Heartbeat

I keep billing on each server as failover is a very remote occurance

but you could use a seperate billing server or use the second server as the billing server.

Ian[quote]- how to implement that the system will not even interrupt an ongoing phone call if one server is going down.[/quote]

I dont think in the case of asterisk this is possible, but worth a try using canreinvite=yes

I think 1/2 of your request is doable. I would highly suggest deploying a HA cluster using DRBD and Linux Heartbeat.

If you aren’t familiar with DRBD (Distributed Replicated Block Device) it is basically network layer RAID 1. (drbd.org) Basically you would store all your /etc/asterisk/*.conf files and your mysql data files on the DRBD device.

Any time data was written to the disk on the primary server, that write operation would be replicated over the network to the standby server. DRBD will ensure the data on both servers stays identical.

Once DRBD is replicating, you can use Linux Heartbeat to manage the monitoring and failover of systems in the event of a system going down. LinuxHA will mount the DRBD device, start mysql, start asterisk and re-assign the virtual IP to the secondary if the primary goes.

The only way you will ensure calls don’t get interrupted is if you perform a re-invite and take asterisk out of the middle… unfortunately you will probably lose the ability to track billing data using this model so it won’t work.