Automatic Failover

This article describes an automatic failover configuration for an A record, in which NS1 is configured to automatically shift traffic to a secondary IP (which normally receives no traffic) upon detecting a failure of your primary IP. For a guide to configuring simple manual failover, read this Knowledge Base article.
Please note that the same guide can be used for CNAME and other record types compatible with a failover configuration.

Configure a Monitor

If you’re using NS1's built-in monitoring, simply follow one of the guides for creating Ping or TCP monitors  
Alternatively, NS1 has pre-configured integrations with the following 3rd-party monitoring services:

  • Amazon CloudWatch
  • Rackspace Cloud Monitoring
  • Pingdom
  • New Relic
  • Catchpoint
  • Datadog

For this example we'll use NS1's Monitors.

Create an A record

  1. Click on the Zones tab and select the Zone you will be working under.
  2. Click on the Add Record button.
  3. Enter the domain (e.g. abc.example.web)
  4. Select the record type as A
  5. Enter your desired TTL.
  6. Set the Answers for this record
  7. Click on the Save Changes button

Preparing the record for failover

  1. Once you've created the A record in the portal, select the record to enter it's configuration page and hit create filter chain.
  2. Click the Plus button next to the Up filter followed by priority then Select First N. Filters can also be dragged and dropped into place. Save Filter Chain.

The applied filter chain will sort the answers by priority (after executing "UP" to remove any answers that are down). The Select First N filter, which will be set to N=1 by default tells the system that after sorting by priority, return ONLY the answer with the highest priority associated.

Configure Metadata for Failover

Now that we have added both servers’ IP’s into the A record config and configured the Filter Chain, we need to set up/down state and a priority value for both servers:

  1. Click each Filter button at the left to reveal the metadata associated with your Filter Chain.
  2. Click the "up" meta data for your answer and the metadata modal will appear. Select the black icon under feed to reveal your feeds/monitors available. Select your monitor and hit save.

  3. Click the "priority" filter and set the priority of the primary IP ( to 1 (note: lower numerical value indicates higher prioritization).
  4. Under the secondary IP's metadata section, connect your secondary monitor or data feed.
  5. Select the "priority" for the secondary IP (  and set it equal to 2.
  6. Click the Save button.
  7. Your record configuration should now look like this: 

You're done!  At this point, if the monitor on your primary server trips, the corresponding answer will be updated to up status of "false" in the NS1 platform immediately.

If you have other DNS records serviced by the same servers, you can reuse the same Data Feeds in those records too.  Updates to a Data Feed will automatically be pushed to every connected answer throughout our system.

Request a Demo

Contact Us

Get Pricing