An independent engineering field journalUnderstanding the systems behind the screen
Field note   ·   November 2026

Why the nearest CDN server may not be the fastest one

Latency matters, but content availability, routing, server load, and reliability also shape where a request gets served.

Documenting the mechanism. Testing assumptions. Keeping the unknowns visible.

Distance is important. It is not the whole optimization problem.

“A CDN puts the file near you” is a useful start. But the technically interesting question is: How does the system decide which server should serve this request now? A node might be geographically close but overloaded, unhealthy, missing the requested object, or reachable through a congested network path.

Content delivery networks (CDNs) replicate or cache assets in distributed infrastructure to reduce origin load and improve the delivery path. They can route requests based on DNS responses, client context, network measurement, load-balancing decisions, or other mechanisms.

Two placement strategies from my reading.

An enter deep approach deploys caches closer to users, potentially inside or near many access networks. That can reduce the last-mile distance but creates more sites to operate and stock with content.

A bring home approach uses fewer, larger clusters at strategically connected locations. Operational control is easier in some respects, but the user's path to a cluster may be longer.

Placement, not a literal map
ENTER DEEP                  BRING HOME
  Users → nearby cache       Users ↘
  Users → nearby cache                large CDN cluster
  Users → nearby cache       Users ↗

Trade-off: number of sites vs. path distance

Which server actually gets your request?

Several factors can influence selection: current server load, network latency and congestion, whether the content exists in a cache, costs, policy, and operational health. A CDN might prefer a slightly farther healthy server over a near one in trouble.

The selection can also change between requests. DNS-based routing doesn't mean every client gets the same answer, and a cache hit can avoid the need to fetch the object from the origin.

What I would measure before blaming distance.

First inspect where the requested hostname resolves from the relevant network. Then examine connection timing, response timing, cache headers when present, and whether subsequent requests hit an existing connection or a cache. Geography alone won't explain a slow request.

# Inspect DNS answers
host example.com

# Observe high-level timing for a real HTTPS request
curl -sS -o /dev/null \
  -w 'dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} total=%{time_total}\n' \
  https://example.com

These timings are a client's view for one request, not the CDN's entire control-plane explanation. They're useful evidence, not a final diagnosis.

This is a larger systems engineering lesson.

“Closest” is only meaningful after you define what you're optimizing for.

For industrial automation platforms, the same principle appears in site placement, broker selection, edge computing, and failover. You can't optimize reliability, cost, throughput, and latency by looking at distance alone.

Learning checkpoint

A user is routed to a farther CDN node. Is the routing necessarily broken?

No. Content presence, load, health, policy, or network path quality may justify it. You need measurements to know.

Sources & further reading

← All articlesFollow the learning path ↗