Traffic management filters help you shuffle, weight, prioritize, sort, and select answers based on the metadata and options that you define.
The following traffic management filters are available in Filter Chain:
Filter | Description |
---|---|
Select First Group | This filter selects answers that are only in the same region as the first answer. Use this filter with other filters like Group Sticky Shuffle to group answers by region. |
Shuffle | This filter randomly sorts answers. Use this filter with other filters like Select First N to return a subset of the available answers at random. |
Select First N | This filter eliminates all but the first N answers from the list. Use this filter with filters like Shuffle or Weighted Shuffle to implement a round-robin or weighted round-robin approach to the number of responses that you return. |
Weighted Sticky Shuffle |
This filter combines Sticky Shuffle and Weighted Shuffle to randomly shuffle answers based on the weight metadata field, consistently across the same requester IP address. Changing a set of answers or their weights results in a reshuffling. If you select Apply stickiness by subnet (not by individual IP), requests in the same IPv4 or IPv6 subnet receive the same output. Select this option to ensure that users balanced across multiple recursors get the same answer. Refer to the Using “sticky” filters article to learn more about sticky filtering. |
Group Sticky Shuffle |
This filter sorts regions uniquely depending on the requester IP address, then groups all answers together by region. Use this filter with Select First Group to always return answers from the same region to each user. This filter does not do any geotargeting or global server load balancing. It sorts regions randomly but consistently for each user. Answers with no defined region are considered to be in the same (empty) region. If you select Apply stickiness by subnet (not by individual IP), requests in the same IPv4 or IPv6 subnet receive the same output. Select this option to ensure that users balanced across multiple recursors get the same answer. Refer to the Using “sticky” filters article to learn more about sticky filtering. |
Sticky Shuffle |
This filter sorts answers uniquely based on the requester IP address. The same answer order is always returned. You can use this filter with Select First N to always give a requester the same answer. If you need to weight answers with “sticky” behavior, use Weighted Sticky Shuffle instead. If you select Apply stickiness by subnet (not by individual IP), requests in the same IPv4 or IPv6 subnet receive the same output. Select this option to ensure that users balanced across multiple recursors get the same answer. Refer to the Using “sticky” filters article to learn more about sticky filtering. |
Weighted Shuffle |
This filter reorders answers randomly based on the weight metadata value until all answers are randomly reordered. Answers with a higher weight value will be returned first more often. You can use this filter with the Select First N filter to return one or more answers with probability proportional to their weights. If you need “sticky” behavior, use Weighted Sticky Shuffle instead. |
Cost |
This filter sorts or selects answers based on the lowest cost metadata value. Use this filter to always select the least expensive answer, or use it with the Pulsar Stabilize filter to always select the least expensive option as long as it is within the best performing option threshold you define. If you choose Select answers instead of sorting, only the answers with the lowest cost are selected. NOTE
By default, this filter orders all answers from the lowest to the highest cost. |
Priority |
This filter orders all answers from highest ( Use this filter to always select a group of available answers, or to implement failover in conjunction with filters like Up. If you select Select answers instead of sorting, only the answers with the highest priority are selected. |