So I am currently in the process of developing our systems infrastructure, and of course a piece of that is the voice solution. I am looking at setting up a PBX server and connecting it with a Twilio SIP trunk. So far I have that piece mastered, but I am concerned about the possibility of the server freezing up or crashing and going down (happened to me ONCE during my initial testing),
SO my question is, is there a way to integrate a second PBX as a “failover”, so basically if the primary goes down, the secondary will pick up the slack. I am hoping that it will also sync extensions and settings between the two, so there is no sudden drop. Is this possible? Thank you!
There are commercial High Availability services that you can install a commercial module. I think (having never used it personally) that it should get pretty close to what you are looking for.
You could also set up a “warm spare” that’s an image copy (every morning at 2AM, for example) of server1 to server2. If server1 fails, power it down and connect server 2. If you are running behind a NAT (and you’ve set up the IP addresses correctly) you should be able to switch over with a minimum of fuss. A couple of quick changes to the firewall and you are back on-line.
Warm Spare page from the wiki:
One solution, a two proxmox cluster with glusterfs and set up as HA with one FreePBX of your choice running, and failing over to the other node when broke. Have a standby copy available perhaps cloned from the worker the day before for software/warmware/hackware fu’s, consider that your “warm Spare” , you get both for very little.
I like the proxmox solution.
I have 2 servers setup using the same backup location. I have a copy of the VM on both. I can move my FreePBX service between them as needed. If I have an issue with one I just bring up a backup on the other server. IP address move, licensing moves. I thnk its a good setup.
To do the proxmox thing “correctly”. You need 3 or more servers. You create a cluster of them and then you can use the HA or high availability that’s built into promox.
FreePBX distro loves Promox. It took me a month to learn it, but so worth it. When you build the promox server you will crash them at first so play with them in the lab.
Note: Don’t cluster them until you really understand it.
I would add that to do the cluster thing efficiently, use glusterfs or iscsi for the ‘storage’ not NFS , I prefer zfs as the underlying file system. Also the third machine can be minimal, it would only need to be there to keep the cluster quorate if one of the ‘production’ machines dies, if that happens then the HA machines will seemlessly move to the other node in a couple of seconds and only current calls would be disconnected.
While I agree and also recommend Proxmox for HA, I just want to complement dicko’s answer and remember that “crashing” can mean many things.
For instance, if Asterisk somehow dies or becomes unstable, the underlying virtualization infrastructure may not see that as a failure and may not do anything for you because the virtual machine will be working/running and that is often all it cares about (it will not necessarily be monitoring every “critical” service you need running on said virtual machine). Also, a software that is crashing on one machine is likely to also crash on a second machine… these things tend to be deterministic.
So if you are worried about application instability issues, a hardware HA solution may not solve it for you. You would also need to have a watchdog somewhere checking the status of asterisk and than restarting asterisk everytime it misbehaves.
From my experience, FreePBX cannot make a server freeze or go down, Linux is mature enough to not let a buggy software stop the show.
You are absolutely correct, if asterisk is dying then you will need to fix why, if you are using Proxmox, then you can simply revert to the machine that didn 't break, maybe last week, maybe llast month, that is the glory . . .