AWS recently announced support for IP-based routing on Amazon Route 53. The new option of the DNS service allows customers to route resources of a domain based on the client subnet to optimize network transit costs and performance.
While geolocation routing is designed to route traffic based on the location of the requests, it is based on data that Route 53 collects and keeps up-to-date. IP-based routing adds instead the ability to perform routing relying on specific knowledge of the customers and networks, for example end users from a specific ISP to a dedicated endpoint.
Source: https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-ip-based-routing-for-amazon-route-53/
Scott Morrison, senior specialist solutions architect at AWS, and Suresh Samuel, senior technical account manager at AWS, explain:
With IP-based routing, you can fine-tune your DNS routing by using your understanding of your network, applications, and clients to make the best DNS routing decisions for your end users. IP-based routing gives you granular control to optimize performance or reduce network costs by allowing you to upload your data to Route 53 in the form of client IP to location mappings.
To implement IP-based routing for resource records on Route 53, customers create CIDR collections, with locations and CIDR blocks, that are associated with locations when defining resource records. The new policy can be used in Route 53 as standalone IP-based routing or as an override option, for example latency-based routing with an IP-based routing override.
Morrison and Samuel clarify how IP-based routing determines the IP of the request:
When it is available, Route 53 will use the EDNS Client Subnet (ECS) value to determine responses for the client. Otherwise, it will use the resolver’s IP (...) If the ECS value in the DNS query matches one of the subnets associated with the given location, Route 53 responds to the DNS query with the corresponding answer value in the resource record.
IP-based and geolocation are not the only routing options available on Route 53; it is possible to manage traffic through different DNS failover and routing types, including latency-based routing, geo proximity, and weighted routing to support latency optimized and fault-tolerant architectures. Corey Quinn comments in his newsletter:
I just finished setting up latency-based routing, now there's another thing to learn / choose between.
In a Reddit thread, user PulseDialInternet provides an example of a use case for IP-based routing:
It is about routing specific blocks for various purposes. Could be for example I have a specific optimization setup with Verizon and all traffic from their specific network segments should go to a specific AWS region for their traffic benefit.
If a query originates from an IPv4 or IPv6 address, and no CIDR blocks are specified in the CIDR collection, Route 53 will reply with the default location. For DNS queries with a CIDR longer than the one specified in the collection, Route 53 will match it to the shorter CIDR.
Starting at 0.80 USD per million queries, IP-Based routing queries are more expensive than geo DNS and geo proximity queries that start at 0.70 USD per million queries. The new feature of Route 53 is not supported for private hosted zones.