
How Anycast DNS Made Our Hosting Faster, Smarter, and More Resilient
From 400ms to sub-10ms DNS: How SpeedyPage rebuilt its infrastructure to deliver instant lookups around the world—transparently.
✍️ Written by the SpeedyPage Engineering Team — the infrastructure and systems group behind our global hosting platform. This post shares practical insights from the engineers who built and operate our production-grade Anycast DNS system.
When we started noticing that our international customers were experiencing slower DNS resolution times, we knew something had to change. Our traditional DNS setup was holding back the global performance we wanted to deliver. Here’s how implementing Anycast DNS transformed our hosting platform—and what it means for our customers.
Why We Needed to Rethink Our DNS Architecture
For years, we relied on a straightforward DNS setup: a handful of cPanel DNSOnly servers clustered between our London and Ashburn locations, as these were the only two locations we had when we initially released our web hosting product. This worked perfectly for customers in those regions, but as SpeedyPage grew globally, the limitations became obvious.
Every DNS query—no matter where in the world it came from—had to make the round trip to our servers. If you were located in Australia and hit our first nameserver, based in London, you were easily seeing response times upwards of 400ms.
We realized that in today’s globally connected web, centralized DNS does not offer good performance. Your website might be lightning-fast once it loads, but if DNS resolution takes hundreds of milliseconds, that’s the first impression users get.
The Anycast Solution
Anycast DNS works differently than traditional DNS. Instead of having DNS servers in one location, we deployed DNS infrastructure across multiple geographic regions. Each location advertises the same nameserver IP address using the BGP protocol, so when someone makes a DNS query, it automatically routes to the closest, healthiest server.
The beauty of this approach is that it’s completely transparent to users. There’s no configuration needed, no settings to change—better performance just happens automatically.
The Technical Implementation
cPanel by default is not built to support this. cPanel provides it’s DNSOnly software which utilizes PowerDNS in the backend to host our customer DNS zones. It is designed to run as single servers in a cluster, this means that a nameserver goes to 1 DNSOnly installation and the clustering aspect is ensuring that every server in the cluster has zone data. As a consequence, this means users could potentially route to a nameserver far away, even if one close-by was available at greatly reduced latency.
Originally, we implemented a 32 location anycast using the popular routing daemon Bird on top of 32 DNSOnly instances. In our experience of doing this, we consistently had issues with DNSOnly where zone data would not reliably sync across all 32 installations, and there were also issues with cPanel’s health checking implementation that’d incorrectly mark healthy servers offline. We were knocked down, but not defeated!

We wanted to keep control of our DNS and knew we had to implement anycast to keep up with industry expectations. Introducing dnsdist, dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life is to route traffic to the best server, delivering top performance to legitimate users while shunting or blocking abusive traffic at all costs.
After initial testing, it became clear this would be a winning solution within what we’re currently able to achieve. Rather than running BGP directly on DNSOnly instances across the globe, we instead went with an edge proxy constellation deployed across 35 anycast locations. The concept is simple; our dnsdist DNS proxy sits between users and our backend DNS servers, allowing us to implement our own features and configuration above what is possible with cPanel DNSOnly.
The DNS query process is this: User → Anycast Proxy → Optimal DNSOnly Backend (Only if uncached by the proxy) → DNS Response → User.
The default dnsdist load balancing policy is called leastOutstanding
, which selects the server currently handling the fewest in-flight queries. If multiple servers are tied with the same number of outstanding queries, the system will prefer the one with the lowest configured order
value. If there’s still a tie, it will then choose the server with the lowest measured latency, based on the average response time over the last 128 queries that each server has answered. This would not fall in line with our priority of offering the fastest response times, and rather prioritizes load over latency. As a result, we had to write our own LUA routing policy.
Our in-house policy starts by testing each upstream DNSOnly instance using sample queries. It measures how quickly each upstream server responds to those queries. Once all servers have been tested enough times, it selects the three with the best average response times. These top servers are added to a pool for routing future DNS requests. The fastest server gets most of the traffic, while the others get smaller portions. The script keeps checking performance and updates the traffic distribution to make sure it always uses the best servers. The goal here is to keep fresh latency metrics at all times in case performance over time were to change, including returning servers to the pool if a health check marked it down and it came back.
The Performance Transformation: Before vs. After Anycast
The improvement numbers tell the complete story. We measured DNS resolution times across major regions after implementing the Anycast:
The above data is both cached and uncached, to show the reality with no polish. We find that 90%+ of DNS queries are answered in 10ms or faster, globally, cached or uncached.
The majority of our requests are uncached, this is because shared hosting environments typically hosting more sites with low traffic than high, although this is variable and we have seen spikes as high as 90%. This shows that even with a proxy in front and more uncached queries than cached, we have provided huge performance improvements over a traditional single-homed DNS deployment. This is largely thanks to our LUA load balancing algorithm that carefully selects the right upstream server, so even in the case of uncached queries, we’re still routing the query to a server as close as possible to the end-user
The most dramatic improvements came from our international regions, where users previously experienced DNS resolution times of up to 400ms or more. After Anycast implementation, every region now resolves DNS queries in under 23ms, largely as low as sub 1ms—delivering a consistently fast experience regardless of geographic location.
Beyond speed improvements, our backend infrastructure now operates with reduced load and greater availability from the high-availability nature of Anycast & dnsdist load balancing.
What This Means for SpeedyPage Customers
The transition to Anycast DNS has delivered immediate benefits across our entire hosting platform:
Faster website loading: DNS resolution is the first step in every page load. Cutting resolution times means websites feel more responsive, especially for international visitors.
Better uptime: With DNS distributed across multiple regions, localized network issues or maintenance windows no longer impact global DNS availability. We’ve maintained 100% DNS uptime since the deployment.
Automatic optimization: Customers don’t need to configure anything. Every domain hosted with SpeedyPage automatically benefits from our global DNS infrastructure.
Improved SEO potential: Search engines factor page load speed into rankings. Faster DNS resolution contributes to better Core Web Vitals scores, especially Time to First Byte.
Looking Forward
Anycast DNS was a significant infrastructure investment, but the performance improvements justify every hour of engineering time.
The web is global, and hosting infrastructure needs to match that reality. DNS might be invisible to most users, but it’s the foundation that everything else builds on. Getting it right means better experiences for everyone.
Anycast DNS is included with all SpeedyPage hosting plans at no additional cost. Experience the performance difference with our $1 trial.
No comments yet
Be the first to share your thoughts!