I have a simple failover setup that I am wondering is even possible with Cloudfare.
We provide remote access via Citrix.
I just want the DNS A record to change IP address if the IP address doesn’t respond to an HTTP request correctly for 10 minutes straight.
So, no load-balancing, but basically:
If this http request does not respond for 10 minutes then change the IP address for the A record to backup IP. Then after primary IP starts working again for 10 minutes, change the A record back.
You can certainly write a script that checks for server responses for that site, and if it doesn’t respond for ten minutes, update the DNS record’s IP address. Switching back is more difficult, though. You can test the origin IP and then switch back. If the site fails due to that for ten minutes, the cycle repeats.
I’ve not tried Load Balancer, but I believe it uses their Health Check mechanism, and that can be configured to do an HTTP/S check. I believe the Load Balancer does not need any records set to for it to work. Maybe another @MVP knows more about load balancer configuration.
This is correct. Load Balancing is priced per DNS request, so proxying them will have a higher TTL and less cost, but it can work for subdomains with as low as 10s of TTL.
The check can be configured to be TCP and/or HTTP(S). You can’t even do a simple ping (I wish it was possible, but it’s not).