FreePBX Failover/Load Balance over two different datacenters

Mohammed Hamada
Mohammed Hamada used Ask the Experts™
on
Dear Experts,

I have two FreePBX virtual machines distributed over two different data centers but both are for the same company, I am planning to use sip trunk on those two VMs and seeking to get them to work in failover/load balance mode.

I know that some sip trunk provider provide the capabilities of failover in case my primary Public IP is not responsive however I would like to extend the failover and load balance to the level of the VM as well.

Have anyone tried to do the load balance/failover method on a VM level between two datacenters ? How would VoIP traffic react in case of primary VM down? how about end points configuration ? Can I direct end points to a single FQDN where both IPs can resolve and if one of the VMs are down still the end point would get register and act like nothing is happening ?

I would appreciate any person's comment that have had an experience with such scenario.

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018
Commented:
You'll have a much easier time if you run FreePBX on Ubuntu (installed at machine level), then LXD containers running your FreeBPX instances.

With LXD, you can just clone containers to different machines every night + have a running hot spare.

You can do all this with VMs + VMs are far slower than bare metal machines + tend to introduce lots of additional complexities, especially if Windows is running as your host/machine OS.

Generally, any way you setup your failover, simple way to test this is first just setup failover of your runtime environment. Once your failover is working correctly, then phase in your testing of FreePBX.

Your failover will also include changing your IP address, to your hot spare.

Be sure to run your primary + spare instances on separate machines on different networks.

Tip: If you're new to all this, best to hire someone, as it can be a bit tricky.

Tip: Be sure to do periodic testing of your failover sequence. Maybe once every 30 days, do a full failover so you're constantly switching between instances, to ensure your entire backup (data migration to spare) procedure is working correctly.
Mohammed HamadaSenior IT Consultant

Author

Commented:
Hi David,

Thank you for the advise, my major concern here is that in case of failover I don't want to switch IPs ..etc thats why I asked this question.

Is this achievable in anyway? I have tried to do it with Microsoft Skype for Business on two different pools in different datacenters with pool pairing but unfortunately it requires manual failover. I know it can be done using branch server or appliance but not all functionalities will be there.

So I am trying it with FreePBX in order to maintain multiple sites without doing much work or down time.

I thought of using cloudflare's DNS load balancing capabilities but not sure if it would work properly with VoIP. I would appreciate if you can tell me whether you tried it or not?

Thank you
nociSoftware Engineer
Distinguished Expert 2018

Commented:
The bigest hurdle would be the failover of IP addresses, if those don't migrate from one DC to the other then all connections on the failing equipment will be lost. after reregistration by the phones (phone should be able to register on both systems)  and of the PBX to the ISP a retry by the endusers can be attempted.

The RTP links will fail (They use barebones IP addresses determined using stun etc.) No DNS help here.
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Mohammed HamadaSenior IT Consultant

Author

Commented:
Hi Noci,

Do you think it depends on the phone of how regularly it checks whether the phone is registered/not and re-register ? how would it be possible to do this on an end point ?
Software Engineer
Distinguished Expert 2018
Commented:
Yes i think it is the registration interval.
Most IP-phones have a webpage for configuration. There you should be able to find SIP settings / Phone settings.
which should be adjustable.
Mohammed HamadaSenior IT Consultant

Author

Commented:
Thank you both,

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial