DNS failover primary/secondar

Status
Not open for further replies.

smn

Member
Jul 18, 2017
201
20
18
Are there any gotcha's setting up a primary/secondary FusionPBX pair of servers? They will be in different data centers on different public IP addresses. They will be used for failover only, not for load balancing.

FusionPBX default account will use DNS in addition to subaccounts. For syncing the two I plan to just use the publicly available restore script in the cron.daily folder. So both servers will be identical in every way except for their public IP address.

For the failover, I am thinking of using a DNS failover service in addition to SRV records. Will that all work ok? I know there will be unpredictable delays with DNS failover, because of the way DNS works, and some phones may even need to be manually re-registered/rebooted. SRV records should help mitigate some of that.

I know it's not a perfect solution but it's easy to implement. I just want to make sure it will work for basic failover without too many gotcha's. I think I understand the external gotcha's, just wondering what issues may come up with Fusion/Freeswitch.
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,048
569
113
I wouldn't bother with SRV it will only make things worse IMHO and totally unnecessary when using route 53, I'd definitely recommend that. Cheap as chips and does the job perfectly. Just set all your TTLs to something like 120s and create a health check for the primary. Then just create primary and secondary records for each subdomain and add the health check to each of the primaries.

Works a treat.
 

smn

Member
Jul 18, 2017
201
20
18
I wouldn't bother with SRV it will only make things worse IMHO and totally unnecessary when using route 53, I'd definitely recommend that. Cheap as chips and does the job perfectly. Just set all your TTLs to something like 120s and create a health check for the primary. Then just create primary and secondary records for each subdomain and add the health check to each of the primaries.

Works a treat.

Hmmm, so no SRV? That definitely makes it simpler. I am not sure if SRV will always work properly with CNAME forwarding anyways.

I was thinking that maybe I only need to use the primary domain for failover. All the tenant domains can just be a CNAME to the primary. Saves a bit of money since DNS failover services charge for every domain or subdomain.
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,048
569
113
If you are doing it right, these are not subdomains, they are simple A records client1.mypbxdomain.com, client2.mypbxdomain.com etc.

I don't think I have had a bill over $10 from route53 yet.
 

smn

Member
Jul 18, 2017
201
20
18
If you are doing it right, these are not subdomains, they are simple A records client1.mypbxdomain.com, client2.mypbxdomain.com etc.

I don't think I have had a bill over $10 from route53 yet.

Does Route 53 charge per A record for failover monitoring? I tried their price calculator and it's quite a bit more expensive for external servers. Still inexpensive but more than some alternatives I am looking at.

I am thinking of doing it a little different than what you suggest. Instead of buying a new root domain for each server pair, I am thinking of using one root domain and having a separate A record for each server pair. For what I am doing, tenants may have their own domains already and will want to create their own A records on their own domains. In order to use my failover monitoring they would need to CNAME to my A record.
 
Last edited:

Msquared

New Member
Dec 5, 2019
8
2
3
I wouldn't bother with SRV it will only make things worse IMHO and totally unnecessary when using route 53, I'd definitely recommend that. Cheap as chips and does the job perfectly. Just set all your TTLs to something like 120s and create a health check for the primary. Then just create primary and secondary records for each subdomain and add the health check to each of the primaries.

Works a treat.

@DigitalDaz Running 2 servers with BDR for fail over and Route 53 to handle the DNS, what do you use for the Route 53 health checks?

I thought about just setting health checks for HTTP/HTTPS but I'd rather check the status of the Freeswitch service. I was thinking maybe a custom script running on a conjob to output a metric to CloudWatch every 30 seconds or so would be better?

Any recommendations?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,048
569
113
@DigitalDaz Running 2 servers with BDR for fail over and Route 53 to handle the DNS, what do you use for the Route 53 health checks?

I thought about just setting health checks for HTTP/HTTPS but I'd rather check the status of the Freeswitch service. I was thinking maybe a custom script running on a conjob to output a metric to CloudWatch every 30 seconds or so would be better?

Any recommendations?
I just do the health check on tcp port 5060 that way if freeswitch fails, it fails over.
 
  • Like
Reactions: Msquared

PBXMePlz

Member
Mar 1, 2019
102
10
18
31
I wouldn't bother with SRV it will only make things worse IMHO and totally unnecessary when using route 53, I'd definitely recommend that. Cheap as chips and does the job perfectly. Just set all your TTLs to something like 120s and create a health check for the primary. Then just create primary and secondary records for each subdomain and add the health check to each of the primaries.

Works a treat.
How are you syncing them? I'm finding that a restore facilitated via the script mentioned, visually updates things, but functionally inbound routes still act like you're trying to call an out of the box FusionPBX install.
 
Status
Not open for further replies.