Manual failover is great and all, but it can be even more effective to tie failover into some automation so that as soon as a failure happens in your primary facility, traffic is shifted to your secondary facility. The simplest way to do this is to leverage monitoring tools or services to detect a failure, and feed state changes into NS1 using Data Feeds.
A Data Feed is simply a conduit for NS1 to receive updates about a specific “topic” (e.g., status of a monitor or health check in some monitoring service, load balancing weights, etc) about DNS records, and answers. For example, you can connect a Pingdom Data Source to NS1, and then configure separate Data Feeds under your Data Source for each of the Pingdom monitors you want to use for traffic management in NS1. We support a variety of monitoring services, so if you’ve already invested time and energy getting monitoring set up elsewhere, you can leverage your monitors for traffic management. Of course, you can create monitors with our powerful monitoring tools too, and they work seamlessly with our DNS.
If you’ve already got a manual failover config sending traffic to your primary server most of the time, and a secondary server when things go south, it’s simple to connect some health checks and automate the failover.
We describe the full process in a Knowledge Base article on automated failover — long story short, you’ll need to create monitors in your favorite monitoring service for each of your servers; connect them to NS1 using Data Feeds; and then connect your monitoring Data Feeds to the corresponding answers in your DNS record:
That’s really all there is to it. Once you’ve tied everything together, when a monitor trips, NS1 will be notified via the Data Feed, and we’ll push out the status of your server to all connected DNS answers. The update will be published out to the edges of our platform and we’ll start shifting traffic to your secondary server within milliseconds.
There are of course more advanced failover setups, like active-active ones where you balance traffic across facilities but handle failures gracefully. Looking to do something more complex? Have a question about connecting Data Feeds? Wish we supported a particular monitoring service or tool? Get in touch — email@example.com — we love to talk!