Introduction to the Filter Chain

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
Avoids sending users to “down” or unavailable endpoints.
Automatic load shedding
Prevents poor application performance or outages due to overloaded endpoints.
Geographic-based steering
Maps requesters to the most geographically proximate endpoint.
Round-robin distribution
Balances traffic between endpoints.
Cost-based distribution
Prioritizes 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).

How it works

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.

Note: If all answers are eliminated during Filter Chain processing, then NS1 Connect 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.

Example

Suppose you have an A record configured with four answers where each answer is an IPv4 address corresponding to a host for the domain, examplezone.com.



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.