Anycast for the AWS Cloud

Datapath.io
3 min readMay 24, 2016

In previous blog posts we have written about what anycast is and how it can be used to speed up DNS queries and http requests. In this article we are going to look at Datapath.io’s unique take on anycast and how it combines both anycast DNS and anycast BGP into one service to improve network performance for AWS based services and applications.

But first a brief refresher on anycast DNS and BGP:

Anycast allows multiple servers providing the same service to advertise the same IP address.

With Anycast DNS any one of a number of geographically distributed anycast DNS name servers, residing behind the same IP address, can handle DNS queries resulting in quicker responses.

Anycast BGP allows multiple globally deployed servers to advertise the same IP address. Http requests can then be forwarded to the closest server.

Datapath.io anycast:

At Datapath.io we use anycast for both DNS and http queries to help AWS based services and applications maximize availability, resilience, scalability, robustness and reduce network latency.

Routing Architecture

To understand how Datapath.io uses Anycast, let’s take a closer look at the architecture of Datapath.io’s routing fabric.

Datapath.io’s anycast routing fabric is connected to a minimum of two AWS regions through amazon DirectConnect. It is also connected to transit providers at the datacenter facilities. The cloud service provider uses a standard setup within VPC (load balancers, web, application and database servers) with each service tier residing in a specific subnet.

Anycast DNS

Datapath.io allows service providers to replicate DNS name servers by code, defined within an anycast cloud. This means that the functionality provided by the managed DNS service can be replaced by an application residing within the AWS cloud. DNS queries are then routed to the nearest anycast AWS region which results in a significant reduction in network latency.

Deploying DNS name servers as code allows for a much cheaper solution as compared to traditional managed DNS service providers who have to setup a physical network of name servers to handle DNS queries.

Anycast BGP

Datapath.io also optimizes the delivery of content from the website or application web server to the client. The Datapath.io routing fabric responds to DNS queries with only one any casted IP address. Additionally, multiple instances of a service on two AWS regions advertise the same IP address. Http requests are then routed by the border gateway protocol (BGP), to the nearest AWS region, with the lowest number of intervening network hops.

Advantages

One major advantage Datapath.io anycast has over traditional managed DNS services and CDNs is the use of optimized network routes. As opposed to managed DNS service providers and CDNs who use traditional BGP routes for internet traffic, Datapath.io routes internet traffic over network routes that are optimized for Network latency, packet loss, transit cost and bandwidth. Network routes are usually chosen by routing protocols based on the topological distance between network destinations. This results in most network traffic flowing through the shortest paths with the lowest number of network hops. Because most network traffic flows through these paths they frequently experience high network congestion leading to high network latency. BGP routing decisions are also cost, packet loss and bandwidth agnostic. Datapath.io re-implements BGP to make routing decisions based on these performance metrics.

Datapath.io effectively adds another layer of network performance optimization on top of anycast.

GeoDNS which is employed by most CDNs to speed up the delivery of content to end users has severe limitations with the mobile paltform. GeoDNS works by responding to DNS queries differently based on the client’s location. GeoDNS has the advantage of connecting end users to the nearest geographical web server. However, once an end user IP address is cached as having originated from a particular location, it is always served from the datacenter or web server which is nearest to that location. GeoDNS results in sub optimal use of network resources where the nearest web server is ignored in favor of the cached server which might be further away and could therefore lead to significant network latency.

Article originally published on Datapath.io Blog.

--

--

Datapath.io

Cloud to Cloud Network - All your multi-cloud applications connected via a secure and dedicated private network https://datapath.io/