Load balancing refers to distributing internet traffic over multiple servers providing the same service. Load balancing architectures result in robust, scalable and reliable network resources.
What is DNS Load balancing?
DNS load balancing solutions re-route internet traffic among a set of web servers or cloud instances by leveraging DNS.
DNS maps website names to their corresponding IP addresses. Low trafficked websites usually have one web server that handles internet traffic. The DNS server always responds to DNS queries with the IP address of that web server.
However, as web services grow and start receiving more traffic, the capacity of servers to handle traffic can be exceeded. Web services, therefore, replicate their services across multiple web servers or cloud regions. These web servers provide the same service but advertise different IP addresses.
This allows DNS load balancing architectures to be designed by responding to DNS queries with different IP addresses. As these IP addresses correspond to different web servers, internet traffic is distributed over those servers.
DNS load balancing allows DNS servers to respond to queries based on a number of factors. These include the health of a server, the geographical location of the client and the priority that has been assigned to the IP address.
Problems with traditional DNS Load Balancing
Traditional DNS load balancing solutions have a couple of problems. One of these is it’s inability to take into account the health of a server while responding to DNS queries. Managed DNS service providers have however overcome this problem by incorporating health checks into their architecture.
Additionally, DNS query responses are usually cached for a time before going back to the authoritative server for an update. This can lead to situations where a cached IP address that was up and running when it was queried for the first time, goes down and cannot be accessed the second time round. This can only be remedied once the TTL expires and the resolver can go up to the authoritative server once again and ask for another IP address.
DNS load balancing also requires manual changes to DNS records to remove the record for a server that is down.
Traditional DNS load balancing solutions are based on a routing methodology called unicast. In Unicast routing there is only one destination for network traffic. web servers providing the same service advertise different IP addresses.
Using Anycast for DNS Load Balancing
Anycast, which is a newer approach to internet routing, allows multiple servers to advertise the same IP address. DNS servers respond to queries with the same IP address. The routing infrastructure of the internet, BGP, then routes internet traffic to different web servers over the shortest route possible.
This automatically load balances internet traffic originating in specific regions by routing traffic to the nearest server. It also neutralizes the TTL issue with traditional DNS load balancing solutions.
Using anycast for DNS load balancing also means that DNS records do not need to be updated in case of server failures, as the IP address remains the same.
Datapath.io leverages both anycast DNS and BGP anycast for a global anycast load balancing solution. The anycast AWS load balancer solution can be deployed across multiple AWS regions to maximize uptime and availability. It also supports load balancing and failover for bare metal setups.
Download the Anycast Whitepaper to learn how Datapath.io can help you maximize Uptime and Availablity