Yes, DNS lookups are pretty fast, but why not make them even faster? With anycast routing, DNS queries are served by a name server located in a datacenter near you.
It all starts from a DNS request
When your visitor points their browser towards your domain, whether it’s a direct hit, or a referral from Google, their browser will perform a DNS lookup, which resolves a domain name into an IP address, and given an IP address the browser may then fetch the site.
DNS lookups are usually pretty fast, plus they’re cached at multiple levels, including the web browser, the operating system, your home or office router, your ISP, etc. But when that cache is not available or outdated, there’s always going to be that lengthy DNS request to a domain’s original name servers, the ones you set at your domain registrar.
The farther away these name servers are from the origin of the request, the higher the latency, the round-trip time, and so the slower the response time for that initial DNS request, and with anycast DNS servers, we can easily shave off sometimes hundreds of milliseconds from that request.
How does anycast help?
Anycast works by announcing the same IP range from different locations around the globe using the BGP protocol.
We’re not going to go into much technical details in this post, but basically it allows us to provide our customers with multiple name servers in different datacenters using the same IP address. Which datacenter receives the request depends on the location of the origin. It’s very similar to how Google’s Public DNS works, and many CDN platforms too.
Thanks to Amazon’s global network and Route 53, we were able to seamlessly integrate a highly redundant DNS service for all WordPress sites hosted with Pressjitsu. We’ve seen many DNS requests (especially from Europe) get as high as a 2500% increase in speed (6 ms vs 150 ms) compared to our previous setup.
If you’d like to learn more about anycast routing, this Wikipedia article is a good start. If you have any specific questions about the DNS or CDN implementation here at Pressjitsu, feel free to open a support request.
If you’re not yet hosted with Pressjitsu, click here to start your free trial.