I have three BuyVM nodes with Anycast. If I set up a website on these nodes, the site will be down for users near any node that is temporarily down. This is for my personal website. It’s not a disaster for it to go down every once in a while, but I’d rather not have it.
I am thinking of the following setup.
- Primary DNS server hosted on Anycast IP. This DNS server points to the anycast IP. TTL=1
- Secondary DNS server somewhere else. This points to the failover node. TTL=1
- Static content clones across all three VMs and the failover.
In theory, if a node is down for a customer, the DNS server will be down for them as well, the user will then check DNS2, and will end up on the failover.
Is this a good idea? I know the usual solution is to use GeoDNS and swap the records whenever the node goes down. I imagine other people have thought about this or tried it. Does anyone have recommendations or wisdom to share?
Edit: Actually, it seems NS are called at random instead of in order. I guess this wouldn’t work at all then.