Round Robin is a DNS load balancing technique that distributes web traffic evenly between servers or by preference if using Weighted Round Robin. Each time a record using this configuration is queried, the query will cycle through your endpoints and be returned by the next resource in the queue. Round Robin can also be configured with our Failover service, which is highly recommended. This guide will walk you through the process of configuring the two services together.
Common Use Cases for Round Robin With Failover
While Round Robin helps prevent resources from becoming overloaded, it doesn’t check if a server is down. This means some queries could still be sent to an unhealthy endpoint. Configuring Round Robin with Failover will prevent traffic from being returned to resources experiencing a failure. With this configuration, you can avoid disruption in service for your end users.
- A domain has already been added to your Constellix account
- You have already created a Sonar health check
- You have created a contact for your domain to receive notifications (optional but recommended)
How to Configure Failover With Round Robin in Constellix
For this tutorial, we will be demonstrating how to configure Round Robin with Failover using A records, but the same steps apply when using AAAA, CNAME, and ANAME records.
1. Navigate to Managed DNS > Domains
After logging in to the Constellix DNS dashboard, select Managed DNS on the left-hand side menu to expand options and then click Domains.
2. Select Domain
From the domains list, click on the domain you want to configure Failover and Round Robin for.
Note: Options shown may vary depending on the current configurations set for your domain.
3. Expand A Record Options
After selecting the domain that needs the Round Robin with Failover configuration, you will be taken to the Records page. If you have not configured any records for this record type yet, click the green + icon beside the record you want to configure to expand options, otherwise skip to step 4.
4. Click the green + icon to add an A record
To add an A record, click on the green + icon. If you are editing an existing record, double click on the record name, or tap the gray pencil icon beside the record name you wish to edit.
5. Choose Configuration and Enter Values
In the Edit A Record pop-up window, select the option for Round Robin with Failover on the right side of the window, and then enter the information for your Round Robin with Failover configuration:
A. Name: Enter the hostname for the record.
B. TTL: Time to live (measured in seconds) determines how long a record is cached in nameservers. Visit our What is TTL resource for more information and best practices for TTLs.
Note: For failover configurations, we recommend adjusting the TTL to a maximum value of 300 seconds in order to prevent end-user disruptions.
C. Geo Proximity: The Geo Proximity rule allows you to optimize web traffic by specifying the locations of IP addresses for your DNS A records.
D. IP Filter: This feature lets you configure an IP Filter for your record.
E. Disable Record: This option allows you to remove records from our nameservers without removing the record configuration in the Constellix DNS control panel. See our Disabling a Record tutorial for more information.
F. Record Mode: This mode enables you to configure Failover, Record Pools, or Round Robin with Failover. Visit our Records Mode page for more details on these settings. For this tutorial, select Round Robin with Failover.
There are three Failover settings to choose from. You will also want to designate a contact for failover alerts:
Normal: If your primary host (the first resource listed in your failover configuration) is unavailable, your traffic will be directed to the next host listed. If the primary host and the first alternative resource are down, traffic will be sent to the third host, and so on. Traffic will automatically be sent back to your primary resource once it is available again.
Off on Any Failover Event: For this option, if your primary resource goes down, traffic will be directed to the next healthy resource listed in your configuration, and stay at the alternative resource until you turn Failover back on manually. This option is useful if you want to be able to troubleshoot your primary resource or make changes to it before it goes live again.
One Way: With One Way Failover, your traffic is sent down the list (according to the health of the resources) and stops at the last resource listed. Returning traffic to the primary host would need to be done manually.
G. Contact Notify: Select the contact list that will receive Failover notifications. If you need help with this step, see our Create a Contact tutorial.
5. Add IP for Failover Configuration
In the same window, you will also need to add the resources for your Round Robin/Failover configuration and select the appropriate previously made Sonar check.
Note: The first endpoint should always be your primary resource.
H. IP: Add the IP, starting with your primary. Click Add Another IP to add additional resources.
I. IP: For this configuration, at least two endpoints are required. Enter your backup resource in this field.
J. +Add Another IP: This option lets you add additional endpoints.
K. Sonar Check: Select the Sonar Check you would like to use for monitoring your resources.
Note: A Sonar check must be created for each endpoint in your Round Robin/Failover configuration.
L. Enabled: This allows you to disable endpoints in your Failover configuration at any time (useful for planned maintenance or updates).
M. Active: This column displays whether an endpoint is active or not. The resource that is currently being returned will have a green checkmark beside it.
N. Status: The Status column will denote whether a host is up or down. If your primary resource is active, the status will say n/a.
O. Notes: The note section lets you add important details and keywords so you can easily search for specific records later (optional, but recommended).
Save: Once you have entered all endpoints and have chosen Sonar checks for each, click the green Save and Close button to complete your configuration.
Note: In order for your Round Robin with Failover configuration to take effect, you must review and apply changes.
7. Test Your Failover Configuration
Once you have reviewed and committed your changes, your configuration will instantly propagate to all of our nameservers. To verify that the record is live, you can query it through Mac’s Terminal or the Windows Command Prompt (or PowerShell). Alternatively, you can use our DNS Lookup Tool, which can be used anywhere, from any device.
You can also see your configuration in the main Records area. If you click on the IP for the record with the Round Robin/Failover configuration, the endpoint that is being returned will be designated with an asterisk in the IP/Pool column.
Visit our website for more information on our services and features.