An answer group is a shared label allowing identifying metadata to be linked among a select number of possible DNS IP address answers. Using NS1’s Filter Chain technology, answer groups are used to accomplish advanced routing goals.
In a Filter Chain, filters are organized in a specific order so that each subsequent filter refines the DNS IP address answer list based on those IP addresses that met the requirements of the previous filters. At the end of the Filter Chain, the single best IP address remains and is returned to the user as their DNS query answer.
The Select First Groups filter works with the answer group’s metadata in a Filter Chain to determine those DNS IP address answers that are most relevant to the desired DNS traffic routing for a specific query. Only those IP addresses that share the metadata label, and therefore an answer group, with the IP address initially selected by the prior filter are kept in the Filter Chain.
The following is an illustration of a specific use case showing how the answer group works within a Filter Chain.
Setup: Your network is divided into three server clusters in the continental United States, one located in each of the three cities: Dallas, TX, New York, NY, and San Jose, CA. Each server cluster contains 3 servers, one server in the cluster is twice as powerful as each of the other two.
Desired Outcome: You want users in the US to be routed geographically to the closest server cluster from their location. You also want traffic for each cluster to be split among the three servers to ensure 50% of the traffic goes to the most powerful server and the other two servers split the remaining 50% of the traffic evenly between them.
Solution: Using NS1’s Filter Chain technology, we will create the desired outcome using the following filters in this order: Geotarget Regional, Select First Group, Weighted Shuffle, Select First N.
Prior to setting up the Filter Chain, we need to configure the IP addresses for each server in each datacenter location into answer groups, and then assign metadata to both the groups and individual IPs.
The following graphic shows the resulting answer groups and Filter Chain. The steps to setup this Filter Chain are listed after the graphic.
- Create IP answers for each of the 9 servers.
- Moved the 9 servers into 3 distinct answer groups: Dallas, New York, and San Jose.
- Each group is assigned a georegion based on the datacenter’s location. US-West for the San Jose datacenter, US-East for the New York datacenter, and US-Central for the Dallas datacenter.
- Assign a weight to each individual IP address answer. The more powerful server at each datacenter is assigned a higher value, in this case, 20, and the less powerful servers are assigned a lower value of 10, or half the value of the more powerful server. This will ensure that the more powerful server is assigned twice as much traffic as the other two servers, or 50% of the traffic.
When a query is sent to the Filter Chain, each filter will use the configured parameters to decide which of the IP answer or answers will move to the next filter in the chain. After all filters have sifted the available answers, the final IP address will be returned to the user as the best solution for that user at that time.
The Geotarget Regional filter will sort the answer list in order from geographically closest to geographically furthest away.
The Select First Group filter looks at the first answer in the list and selects the answer group for the first IP address answer. The filter then removes all other answers that do not share the same answer group. This limits the answers to only those IP addresses in the selected IP answer group.
NOTE: Since the Geotarget Regional filter sorted the IP answer list in geographical order by distance from the user’s given IP address location, the first IP address answer in the list will be a server that is closest to the user.
The Weighed filter will shuffle the remaining IP address answers, giving priority to the IP address with the higher weight, 20.
The Select First N (with N=1) filter will return the top answer in the sorted list of IP addresses.
NOTE: That IP address answer will be delivered to the end user.
This is just one example of the use case for answer groups. If you have any questions about your use case or how to build the filter chain you need reach out to our support team for more info.