Creating a Filter Chain

The Filter Chain applies traffic steering rules to optimize traffic distribution across your application endpoints and services. You can choose from a wide range of traffic steering filters, combining and rearranging them to define a routing logic for each record domain based on your objectives and the metrics that matter most to you.

Each traffic steering filter uses a unique processing logic to eliminate or rearrange the list of answers based on some condition or behavior. For example, the Up filter references the up/down metadata within each answer and eliminates any answers marked as down (up = false), which is used to configure automatic failover, whereas the Shuffle filter rearranges the list of answers randomly for round-robin distribution.

The order of filters (from top to bottom) in the Filter Chain is important as it determines the order in which they are applied when processing an incoming request to the record domain. Refer to Introduction to the Filter Chain for details.

Before you begin

  • The following instructions assume you have configured the corresponding DNS record on which you want to configure the Filter Chain.
  • Filter Chains are recommended for DNS records with multiple answers.

Procedure

  1. Click the Zones tab.
  2. Click the record for which you want to configure a Filter Chain.
  3. Click Create Filter Chain.
  4. Click the + to the left of the name of the filter you want to add. Filters are processed from top to bottom, so ordering is important. You can reorder filters as needed by dragging and dropping them.
    Note: NS1 offers a variety of filters that are organized into the following categories:

    Refer to any of the topics linked above to learn more about the individual filters within each category.

  5. If a figure is configurable, click the filter and add any additional settings.
  6. Click Save Filter Chain. The new Filter Chain configuration appears to the left of the answer list.
  7. Click the filter to view the corresponding metadata fields for each answer. This metadata field is what that filter references when making routing decisions. For example, the Up filter references the up metadata field to see if it is set to true or false. At this point, the metadata field is likely empty, so you must edit the answer metadata or configure automatic updates from a native or third-party data source.

    Click the label beneath each answer to edit that metadata field.

  8. In the Answer Metadata modal, you get a filtered view that only shows the selected metadata field. You can set the metadata value manually or click the feed icon to attach an existing NS1 monitor or data source to automatically update this field as conditions change. Note that changes made on this screen are saved automatically. Once complete, click OK to exit the modal.
    Note: You can view all metadata fields by clicking Show all metadata.

    Repeat this step to edit this metadata field for all answers.

  9. Repeat steps 7 and 8 for all other filters in the Filter Chain configuration, editing the relevant answer metadata where applicable.
    Note: Some filters do not reference specific metadata fields (for example, Select First N filter).
  10. Once you have updated all the relevant metadata field(s) for each answer, click Save Record. Now, as DNS queries are made against the record, each filter eliminates or rearranges answers based on their metadata field or some other specified criteria. The answers that make it through the Filter Chain are returned to the requesting client.