Powered by the IBM NS1 Connect platform, the Filter Chain makes it easy for you to apply traffic steering rules to optimize traffic distribution across your application endpoints and services. You can choose from a variety of traffic steering filters, combining and rearranging them to define a routing logic for each of your domains based on your objectives and the metrics that matter most to you.
Using the Filter Chain, you can implement complex decision-making logic by chaining together simple, single-purpose components (similar to the Unix pipeline). Common traffic steering configurations include:
automatic failover to avoid sending users to “down” or unavailable endpoints,
automatic load shedding to prevent poor application performance or outages due to overloaded endpoints,
geographic-based steering to map requesters to the most geographically proximate endpoint,
round-robin distribution to balance traffic between endpoints, and
cost-based distribution to prioritize lower-cost endpoints.
The Filter Chain is often used in conjunction with basic, RUM-based, or third-party monitors to enable automatic updates to certain answer metadata fields — ensuring each incoming request is processed based on the latest availability and performance data.
Organizations managing more demanding applications or routing requirements can leverage real user monitoring (RUM) data to automate traffic steering optimization across hybrid or otherwise complex global network infrastructures. The NS1 Connect platform ingests a stream of RUM data collected from private or shared endpoints, rendering real-time performance and availability metrics that can be used to implement advanced traffic steering configurations like global server load balancing (GSLB).
If you have a domain with multiple, redundant application endpoints or services, you can create a DNS record in the NS1 Connect platform containing multiple answers—each answer corresponding to one of the endpoints. Once created, you can create a Filter Chain within the record settings to define the custom routing logic the platform will use to inform routing decisions.
Choosing from a variety of traffic steering filters, you can add and rearrange filters in the order they should be applied when processing incoming requests. Each filter applies a unique processing method and either eliminates (sifts) or rearranges (sorts) answers based on some criteria or condition. For example, the Up filter eliminates unavailable answers from the answer pool, whereas the Geotarget Regional filter rearranges the list of answers based on their geographic proximity to the requesting client. The order of filters determines the order in which they will be applied when processing incoming requests.
Many filters reference certain metadata fields within each answer when processing. For example, the Up filter references the “up/down” status indicated in the metadata for each answer to identify “down” endpoints. Similarly, geographic filters reference the geolocation metadata for each answer. Whichever metadata field(s) are referenced the record’s Filter Chain configuration must be updated manually or connected to a monitoring data feed to enable automatic updates.
With the Filter Chain configured and the answer metadata updated or connected to a data feed, the record’s traffic steering logic is activated. When the record is queried, the answers are processed by each filter in the Filter Chain from top to bottom until there are no more filters. The remaining answer(s) are returned to the requesting client.
If all answers are eliminated during Filter Chain processing, then NS1 will ignore the Filter Chain and return all answers to the requester to ensure something is returned to the requester. For this reason, we do not recommend using the Filter Chain for strict access control or security-based objectives.
Suppose you have an A record configured with four answers where each answer is an IPv4 address corresponding to a host for the domain,
Once the record is created, you apply a Filter Chain configuration using three the following filters in this order:
The Up filter references the up/down metadata and eliminates down or unavailable answers.
The Geotarget Regional filter compares the location of the requester based on their IP address to each answer and rearranges the list of answers based on their proximity to the requester.
The Select First N filter eliminates all but the first "N" number of answers. By default, this is set to "1" meaning only the first answer remains in the list.
Both the Up filter and Geotarget Regional filter reference answer metadata when processing requests, so you update the relevant metadata fields manually or connect a data feed to enable automatic updates.
For each answer, you create and connect the relevant data feed to the "Up" metadata field to enable automatic updates.
For each answer, you specify the geographic region(s) associated with that answer.
Once configured, the configuration would look like this on the record details page:
Upon receiving a request for
examplezone.com from a DNS resolver with IP address 198.51.100.0, the NS1 Connect platform processes the query through each filter in the Filter Chain as follows:
The Up filter eliminates the answer, 192.0.2.2, because the connected data feed indicates the corresponding endpoint is unavailable. All other answers indicate an "up" status, so the filter passes the list to the next filter.
The platform looks up the requester’s IP address in the GeoIP database to determine the geolocation and compares it to the requester. The requester IP is determined to be located in California, so the Geotarget Regional filter moves the answer 188.8.131.52 to the top of the list as it is located in the US-WEST region and rearranges the remaining answers based on their proximity to the requester.
Refer to this article to learn more about the EDNS client subnet (ECS) extension which allows the platform to determine a more precise geolocation of the requester.
Using the default setting where N=1, the Select First N filter eliminates all but the first answer in the list.
The NS1 nameservers include the IP address 184.108.40.206 in the DNS response because it is the closest available endpoint to the requesting client.