A round-robin approach is one of the simplest ways to distribute traffic across multiple endpoints. Round-robin load distribution ensures that traffic is routed to each redundant endpoint (or answer) randomly to ensure that no one endpoint receives more traffic than the other endpoints. To ensure that all requests are sent to available endpoints, you should also add checks to verify that the answer is up before distributing traffic to it.
For example, imagine that you have four answers to which you want to distribute traffic (servers A through D). A round-robin approach distributes traffic randomly to Server A, B, C, or D. If Server B's status is down
, it will be removed from the list of possible answers until it becomes available again.
Note
Before creating a record, you must first create the zone in which the record should reside. Review Create a DNS zone to learn how to create a zone.
To create a record and its answers:
-
Click DNS in the main navigation. By default, the Zones page opens and displays a list of the zones assigned to your account.
-
Select the zone for which you want to create a record by clicking its name. Details about the zone will display, including a list of records (if any exist).
-
Click the + icon or Add record to open the Add Record modal.
-
Complete the fields of the form. Give the record a name (subdomain), or leave the record blank to create a root-level record. Optionally, specify a time-to-live (TTL) value; the default value is
3600
. Finally, add answers to the record before clicking Save record. -
Open the record by clicking its name. Details about the record are displayed, including the list of answers that you created in the previous step.
Now that you have created a record and its answers, you must create a Filter Chain that can distribute traffic between them evenly.
Note
The following Filter Chain makes use of the Up filter. You can manually set the metadata for this filter for each answer or create and assign monitors to each answer. To learn how to create a monitor, see DNS monitors.
To create a Filter Chain:
-
Click Create Filter Chain. The filters modal opens, displaying a list of the various filters available to your account.
-
Add the Up and Shuffle filters (in that order) to the Filter Chain by clicking the + to the left of their names. Click Save filter chain.
-
Click the Up filter in the Filter Chain list to the left of the answer list. The up metadata tag appears as unset on each answer. Click the tag to manually set the status to up or down, or click the feed icon to assign a monitor to that answer that will automatically update the status. Click OK to save the metadata to the tag.
-
Repeat the process to set up metadata for each answer.
-
Click Save record.