DNS Propagation Testing for Game Servers: A Runbook for Catching Silent Failures
In a nutshell
Run DNS propagation testing for game servers the Cloudflare way: detect stale records, measure propagation, and gate every release on real data.
Your release is green. Your dashboards are flat. And somewhere in São Paulo, a player is staring at a "Connecting…" spinner that will never resolve.
That's the DNS failure mode that hurts most: the service is up, the health checks pass, and the thing that actually broke is the name your players use to find you. Cloudflare's DNS team hit exactly this. In one rollout of the service that publishes DNS records to their edge, a scheduling bug let record changes sit unpublished for hours. The service stayed healthy. New hostnames just didn't resolve — and certificates couldn't be issued until the bug was squashed.
If you run game servers, this is your problem too. Every new region, every new shard, every blue-green cutover depends on a DNS record that has to land in thousands of resolvers you don't control. This runbook covers how to detect that failure, how to remediate it, and how to stop it from shipping again.
Why DNS failures slip past your monitoring
Most game backend monitoring watches the wrong layer. You have uptime checks on your origin, latency graphs on your matchmaker, and alerts on your load balancer. None of those see DNS.
DNS fails in three ways that make it invisible:
- It's slow. A bad record doesn't throw an error. It sits in a recursive resolver's cache until TTL expiry. If your TTL is 3600 seconds, you have an hour of wrong answers after you "fix" it.
- It's partial. Resolver A in Frankfurt has the new record. Resolver B in Singapore is still serving the old one. Your synthetic check from Virginia says everything is fine.
- It's upstream of your stack. Your APM traces start when the request hits your edge. DNS resolution happens before that. A failed lookup never appears in your traces at all.
The Cloudflare post puts it plainly: DNS failures are hard to catch because they're slow, spread across the network, and partial in where they cause impact. That's not a monitoring gap you close with a better dashboard. It's a gap you close with active probing.
The failure mode, concretely
Here's the pipeline most game backends run:
- Your control plane writes a desired record set (name → address, weight, TTL).
- A publisher pushes that set to your authoritative nameservers.
- Recursive resolvers around the world cache the answers.
- Players' clients ask their local resolver and get whatever it has.
Every step between 2 and 4 can silently fail. The publisher can drop a change. The authoritative server can accept the write but not serve it. A resolver can hold a stale answer past its TTL because of a bug or a misconfigured cache.
Meanwhile your health check is hitting 10.0.1.10:7777 directly. It doesn't care that na-east.game.example.com still points at a decommissioned IP. Green dashboards, dead region.
What "propagation" actually means
Propagation is not a single event. It's a distribution — a curve of how many resolvers have the new answer over time. That distinction matters because it changes what you measure.
- Correctness is binary: does this resolver return the expected set?
- Convergence is a duration: how long until 99% of your probe points return the expected set?
You need both. A record set that's correct in 28 of 30 regions and stale in 2 is not "propagating." It's broken, and you just haven't found the 2 yet.
Also watch the TTL floor. If you publish a record with TTL 300 but your provider enforces a 600-second minimum, your "fast rollback" plan is fiction. Check what your authoritative provider actually serves, not what you asked for.
How to detect it: active probing from everywhere
The technique is simple to describe and fiddly to get right. Run a probe from every region you care about, on a schedule, against production. Compare what you get to what you expect. Record the time it took to converge.
Cloudflare's answer was to extend Flamingo, the end-to-end testing framework they already run hundreds of millions of tests against per day. The relevant lesson isn't the tool — it's the shape of the test: constant, from every data center, against production.
Here's a minimal probe you can adapt. It runs from a single vantage point and reports one JSON line per check.
# probe_dns.py — one vantage point, one desired-state check
import json, time
import dns.resolver
# The desired state. This should come from the same source of truth
# your publisher reads, not from a hand-maintained list.
EXPECTED = {
"na-east.game.example.com": {"10.0.1.10", "10.0.1.11"},
"eu-west.game.example.com": {"10.0.2.10", "10.0.2.11"},
}
def probe(name: str, expected: set[str], timeout: float = 2.0) -> dict:
resolver = dns.resolver.Resolver(configure=False)
resolver.nameservers = ["1.1.1.1", "8.8.8.8"]
resolver.timeout = timeout
resolver.lifetime = timeout
start = time.monotonic()
try:
answers = resolver.resolve(name, "A")
observed = {r.address for r in answers}
ttl = answers.rrset.ttl
except Exception as exc:
return {
"name": name,
"ok": False,
"error": type(exc).__name__,
"elapsed_ms": round((time.monotonic() - start) * 1000, 1),
}
elapsed_ms = round((time.monotonic() - start) * 1000, 1)
return {
"name": name,
"ok": observed == expected,
"observed": sorted(observed),
"expected": sorted(expected),
"ttl": ttl,
"elapsed_ms": elapsed_ms,
}
if __name__ == "__main__":
for host, expected in EXPECTED.items():
print(json.dumps(probe(host, expected)))
Run that from 20–40 vantage points (your own regions, or a cheap probe network) every 30–60 seconds. Ship the JSON to whatever you already use for metrics. Now you have a time series of correctness per region, and you can compute convergence as "seconds until the last region flipped."
The queries you'll actually run during an incident
When a region is reported dead, these are the first three commands. They answer three different questions.
# 1. What does a public resolver say right now?
dig +short @1.1.1.1 na-east.game.example.com A
# 2. What does your authoritative server say? (bypass caches)
dig +noall +answer @ns1.your-dns-provider.com na-east.game.example.com A
# 3. What TTL is actually being served, and how long until it expires?
dig +noall +answer +ttlid @1.1.1.1 na-east.game.example.com A
If (1) and (2) disagree, the problem is caching — you're waiting out a TTL. If they agree and both are wrong, the publisher never landed the change. Those are different bugs with different fixes, and knowing which one you're in saves you from "fixing" the wrong layer.
The runbook
Step 1 — Publish the desired state as data
Your probe needs something to compare against. Keep a machine-readable manifest of every record your game depends on: name, type, expected addresses, TTL, and which regions should see it. Generate it from the same source your publisher reads. If the manifest and the publisher can drift, they will.
Step 2 — Probe continuously, not just on deploy
Deploy-time checks catch deploy-time bugs. They miss the resolver that goes stale six hours later, or the record that gets clobbered by an unrelated change. Probe on a schedule, forever, against production.
Step 3 — Measure convergence, not just correctness
Track two numbers per record set:
- Time to first correct answer — how fast the change starts landing.
- Time to 99% convergence — how long until almost every vantage point agrees.
Set an SLO on the second one. Something like "p99 convergence under 120 seconds across 30 vantage points" is a reasonable starting target for a 60-second TTL. Measure your own baseline before you pick a number.
Step 4 — Gate releases on the SLO
This is the part that turns probing into safety. If convergence exceeds the SLO, the release stops. Cloudflare's post describes exactly this: the measurements decide whether a release goes ahead or gets rolled back. You don't need their scale to copy the pattern — a CI step that polls your probe metrics for 5 minutes and fails the job on a breach gets you most of the way.
Step 5 — Remediate in the right order
When the gate fires or an alert lands, work outward from the source:
- Confirm the publisher landed the change. Diff the authoritative answer against the manifest. If they differ, re-publish and watch convergence.
- If the publisher is stuck, roll back to the last known good record set. A stale-but-working region beats a "correct" record set that never lands.
- If the change landed and caches are stale, you wait. You cannot flush third-party resolvers. This is why TTL planning matters more than incident-time heroics.
- If waiting is unacceptable, change the name. Point clients at a new hostname with no cached history. This is the blue-green trick, and it's the only reliable way to bypass a stuck cache.
Prevention: the things that actually reduce incidents
Lower TTLs before you need them
Drop TTLs from 3600 to 60 at least 24 hours before a migration window. That gives resolvers time to expire the long-TTL answers so your short-TTL change lands fast. Raise them back after the window closes. This costs you more authoritative queries during the window — usually a rounding error, but budget for it.
Version your hostnames
Instead of repointing game.example.com, publish v42.game.example.com and update the client's endpoint list. A name nobody has queried has no cached answer to fight. This is the single most effective mitigation for "the cache won't clear" incidents.
Diff record sets in CI
Before any deploy, diff the desired record set against what's currently served. A one-line summary in the deploy log — "3 records added, 1 removed, 0 changed" — catches the accidental deletion that would otherwise take down a region at 3 a.m.
Give clients a fallback path that doesn't depend on DNS
This is where a lot of teams leave value on the table. If your client's only way to find a server is a DNS lookup, then a stuck resolver is a total outage for that player. Ship a second path.
horizOn's remote configuration lets you push an ordered endpoint list to clients without a store update — so when a region's DNS goes stale, the client can fall back to a known-good address on its next config refresh instead of waiting out a TTL. It's not a DNS fix, but it's a real safety net for the exact failure mode above. If you're designing region fallback more broadly, the patterns in architecting server fallbacks for live ops cover the client-side logic that decides when to switch.
Instrument the client side too
Server-side probes tell you what resolvers see. They don't tell you what your players experienced. A client that fails to resolve a hostname should log it explicitly — hostname, resolver error, region, timestamp — and ship it to your backend. horizOn's user logs and crash reports give you a place to land those events without standing up another pipeline. When you're debugging "some players can't connect," client-side resolution failures are the first thing you want to rule out.
If you're already chasing connection timeouts that look like DNS but aren't, the diagnostic approach in our breakdown of Unreal Engine network driver timeouts is a useful complement — it separates name resolution failures from transport failures before you start changing records.
A client-side sanity check
Before you hand a player a spinner, verify the name resolves. This is a cheap guard that turns a silent hang into a diagnosable error.
# server_discovery.gd — resolve the region hostname before connecting
extends Node
const REGION_HOSTS := {
"na-east": "na-east.game.example.com",
"eu-west": "eu-west.game.example.com",
}
func resolve_region(region: String) -> String:
var host: String = REGION_HOSTS.get(region, "")
if host.is_empty():
push_error("Unknown region: %s" % region)
return ""
# Blocking call. On a loading screen this is fine; in-game, use
# IP.resolve_hostname_queue_item() and poll it instead.
var address := IP.resolve_hostname(host, IP.TYPE_IPV4)
if address.is_empty():
push_warning("DNS resolution failed for %s" % host)
_report_resolution_failure(host, region)
return ""
return address
func _report_resolution_failure(host: String, region: String) -> void:
# Send to your backend so you can see per-region resolution failures.
var payload := {
"host": host,
"region": region,
"timestamp": Time.get_unix_time_from_system(),
}
# e.g. HTTP POST to your logging endpoint
print(JSON.stringify(payload))
The IP.resolve_hostname call blocks, so keep it on a loading screen. If you need it mid-game, use IP.resolve_hostname_queue_item() and poll the returned ID — otherwise you'll stall the main thread for the duration of the lookup.
Best practices you can apply this week
- Set a convergence SLO and measure it for two weeks before enforcing it. You need a baseline to know whether 120 seconds is generous or impossible for your provider.
- Probe from at least 20 vantage points, including the regions your players actually live in. A probe network concentrated in the US will miss the failure that only affects APAC.
- Lower TTLs 24 hours before any migration window, and raise them after. Short TTLs are an incident tool, not a permanent setting — they multiply your authoritative query volume.
- Version hostnames for anything you might need to move in a hurry. A fresh name has no cache to fight.
- Log client-side resolution failures explicitly. Server probes tell you what resolvers see; only the client tells you what the player got.
The trade-offs
None of this is free. Continuous probing from 30 vantage points at 60-second intervals is roughly 43,200 queries per day per record set — trivial against a public resolver, less trivial against your own authoritative infrastructure if you're probing every shard. Budget the query volume.
Short TTLs cut both ways. A 60-second TTL means a bad answer clears in a minute, but it also means 60× the authoritative query volume compared to 3600. If your DNS provider bills per query, model that before you drop TTLs globally.
And gating releases on convergence adds latency to every deploy. A 5-minute gate on a pipeline that runs ten times a day costs you 50 minutes of wall clock. That's usually the right trade — but make it a deliberate one.
The bigger point is that DNS is infrastructure you can measure. Treat it like the rest of your stack: define the expected state, probe it continuously, alert on divergence, and let the measurements block a release. The Cloudflare team built that into a framework running hundreds of millions of tests a day. You can build a smaller version in an afternoon, and it will catch the failure your dashboards never see.
Next step
Pick one record set your game depends on — the matchmaker endpoint or your primary region's hostname — and write the desired-state manifest for it today. Then run the probe script above from two machines in different regions. If the answers disagree, you've just found your first incident before a player did.
If you want a fallback path for clients that doesn't depend on DNS resolving correctly, horizOn's remote configuration and user logs are a good place to start — push an endpoint list, then watch client-side resolution failures land in your dashboard.
Source: Probing DNS at Cloudflare