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 Amazon Web Services 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.
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.
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 Amazon Web Services 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.
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 Amazon Web Services 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.
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 Amazon Web Services region, with the lowest number of intervening network hops.
The Datapath.io anycast architecture for AWS can be used for load balancing internet traffic over multiple AWS regions, based on regional preferences or business rules. Load balancing internet traffic is especially useful for web services which see heavy internet traffic or frequent spikes in traffic. Load balancing ultimately leads to more resilient, reliable and scalable web services.
Click here to read more about the AWS Load balancer from Datapath.io.
Failover/ High Availability
The anycast architecture can also be used in an active/passive configuration to ensure high availability and failover during outages. The routes to a particular AWS region are degraded to an extent which makes the routers in the public internet prefer routes to the active VPC (Virtual private cloud). Continous health checks are conducted and whenever the active VPC experiences an outage, the route degradation is immediately withdrawn from the inactive VPC, resulting in internet traffic being routed to it.
Read this blog about ensuring high availability using AWS anycast Failover.
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 which 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 with it’s Network Performance Platform.
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. It 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.
Download the AWS Anycast Whitepaper to learn more.