Configuring automatic load shedding
Load shedding refers to a traffic steering strategy in which DNS traffic is steered away from overloaded endpoints or services to help prevent an endpoint from becoming unhealthy. This configuration can help avoid a failover situation and minimize or prevent a negative impact on application performance. Automating this process improves operational response time when one or more endpoints manage high volumes of DNS traffic.
How it works
Once configured, load-related metrics collected by third-party data sources are sent to the NS1 Connect platform, automatically updating the metadata for the corresponding answer(s) in the DNS record. When the record domain is queried, each filter in the record's Filter Chain eliminates or arranges the answers based on some criteria—including the Shed Load filter which compares the load metric to the defined low and high thresholds, gradually steering traffic away from overloaded endpoints.
The Shed Load filter evaluates each answer using the following logic:
- Does the answer have the relevant metadata?
- If not, the filter will not take any action on that answer. Similar to the Up filter, answers without the relevant metadata remain in the answer pool.
Note: Unlike some NS1 Connect filters that eliminate answers without relative metadata from the answer pool (for example, the Up filter), this filter does not eliminate answers if they are missing relevant metadata.
- Does the answer have the necessary threshold values set?
-
- If the load metric is below or equal to the low watermark, the answer remains in the answer pool.
- If the load metric is above or equal to the high watermark, the answer is removed from the answer pool.
- If the load metric is between the low watermark and the high watermark, the Shed Load filter removes the answer at a frequency equivalent to the distance it is between those two points. For example, if the low watermark is set to 80, the high watermark is set to 90, and the calculated load metric value is 82, that particular endpoint would be removed from the list of available answers 20% of the time. If the calculated load metric value is 88, that particular endpoint would be removed from the list of available answers 80% of the time.
After each answer is evaluated, if none of the answers meet the criteria (that is, they all exceed the low or high watermark), then all answers are returned and, if applicable, passed to the next filter in the Filter Chain. In other words, if the load-related metric indicates that all answers are underperforming or overloaded endpoints, then the Filter Chain skips the Shed Load filter to avoid eliminating all answers from the answer pool.
Before you begin
- You must have a third-party monitoring service collecting load-related data from the domain endpoints and services you want to integrate with the NS1 Connect platform. Basic NS1 monitors support up/down monitoring only and cannot be used to configure automatic load shedding.
Note: If your organization leverages the NS1 Connect RUM-based traffic steering solution (Pulsar), consider using the RUM-based traffic steering filters to configure load balancing based on real-time data from your active application users.
- The following instructions assume you have configured the DNS zones, records, and answers corresponding to the monitored domain endpoints and services.
- The Shed Load filter references one of three load-related metrics: load average, number of active requests, or the number of active connections; however, the metric type label is nominal and the definition depends on the user-defined script that pushes data to the NS1 Connect platform.
Configuration overview
The following steps outline the process for configuring automatic load shedding across your domain endpoints and services.
Refer to the relevant instructions for configuring a third-party data source from your preferred monitoring service. Once the data source is established, configure a data feed for each monitored endpoint.
The Filter Chain configured within the DNS record settings determines how the NS1 Connect platform will process incoming requests to the domain. Choosing from a portfolio of traffic steering filters, you can build a custom routing logic to optimize DNS traffic distribution across your domain endpoints and services. To configure load shedding, you must include the Shed Load filter which evaluates one of three load metrics specified in the answer metadata and compares it to the low and high thresholds you specify.
Complete the following instructions to configure a Filter Chain to support automatic load shedding.
- Click .
- Click the name of the relevant zone to view zone details.
- Under the Records tab, click the name of the DNS record on which you want to apply load shedding.
- Click Create Filter Chain.
- Drag and drop or click the plus sign (+) to the left of the filters to add them to the Filter Chain in the following order:

- Up filter
- Eliminates down or unavailable answers.
Note: Connect an NS1 Connect monitor or third-party data feed to the Up/down metadata field to ensure the Up filter can access the latest availability data for the monitored endpoint. Refer to Automatic failover for details.
- Shed Load filter
- References the specified load metric and the defined low and high watermarks, eliminating overloaded endpoints from the answer pool.
- Select First N filter
- (Optional) - Eliminates all but the first N (number) of answers. By default, N=1, meaning only one answer remains in the answer pool after being processed by this filter. For this reason, this filter is typically placed at the end of the Filter Chain to ensure only one answer is returned to the requester.
- Click Save Filter Chain.
The Up and Shed Load filters reference specific answer metadata fields when processing incoming requests. Typically, these fields are connected to a monitor to receive automatic updates as network conditions change. While you can use basic NS1 Connect monitors to automate updates to the Up/down metadata field, you cannot use these monitors to update load-related metrics. However, if your third-party monitoring service collects availability data (up/down status) from the endpoint and load-related metrics, you can connect the third-party service to both fields.
Follow the instructions below to connect each data feed to the metadata fields referenced by the Filter Chain you just configured.
- On the record's Setting & Activity tab, scroll down to view the Filter Chain you configured alongside the answers within the record.

- Click the Up filter, expanding the description and displaying the up metadata field beneath each answer.

- Click the up metadata label beneath the first answer to set the up status.

- Set the up status manually or click the Feed icon to reveal a list of available monitors and data feeds you can select to configure automatic updates. Refer to Automatic failover for details.

- Click OK.
- Similarly, click the Shed Load filter to expand the description and reveal the corresponding answer metadata fields beneath each answer.

- From the drop-down list in the description, select the load metric you want to use to inform traffic steering decisions.

- Load average (
loadavg) - If selected, connect the data feed to the average load metadata field within each answer. The value must be a positive decimal number with one digit of precision, for example, 1.0
- Active connections (
connections) - If selected, connect the data feed to the active connections metadata field within each answer. This value must be a positive integer between 0 and 2^32.
- Active requests (
requests) - If selected, connect the data feed to the active requests metadata field within each answer. This value must be a positive integer between 0 and 2^32.
Attention: The metric label is nominal, and the actual definition depends on the user-defined script that pushes data to the NS1 Connect platform. - Load average (
- Click one of the metadata labels beneath the first answer to display all metadata fields relevant to the Shed Load filter.

- Click the load-related metadata corresponding to the load metric specified in the filter—either active connections, load average, or active requests.
- Click the Feed icon to display a list of available data feeds you can connect for automatic updates.
- Select the data feed corresponding to this DNS answer.
- Click the Low watermark metadata field and enter a value representing the point at which the platform will begin to steer traffic away from this endpoint.
- Click the High watermark metadata field, and enter a value representing the point at which the NS1 Connect platform will stop sending DNS traffic to this endpoint.
- Click OK.
- Repeat this process for each answer in the DNS record.