8 min readEngineering

Edge POPs vs DNS-only routing: which fits a URL shortener

DNS picks where a request goes; an edge POP cache decides whether it has to go there at all. When each fits a shortener, with distance math and cache TTLs.

Marius Voß
DevRel · edge infra

DNS-only routing and edge POP routing answer different questions. DNS decides which server a visitor is sent to, once, when the hostname is looked up. An edge POP (point of presence) is a cache close to the visitor that can answer the redirect itself, so the request may never reach the origin. For a URL shortener, where the same few slugs are read over and over, the cache usually matters more than the routing.

This post compares the two designs on the points that decide the choice: round-trip distance, failover, cache behaviour, what edits cost, and where an edge fleet does not help. The Elido specifics come from the code in services/edge-redirect. For the latency budget behind them, see hitting p95 under 15ms for redirects.

What DNS-only routing does

With DNS-only routing, the authoritative DNS server returns an IP address chosen for the asker. The simplest version returns the same address to everyone. The more useful version returns different answers by location or measured latency. Amazon's documentation for Route 53 latency-based routing (accessed 2026-10-09) describes it this way: it checks which regions you created records for, finds the region with the lowest latency to the user, and answers with that record. The same page notes that the latency data reflects traffic between users and AWS data centers, so the figures can differ from your own hosting.

Two properties follow from this design.

First, the decision is made by a resolver, not by the visitor. DNS sees the resolver's address, not the browser's. The same Route 53 page says that resolvers supporting EDNS client subnet pass along a truncated version of the user's address, which improves the guess. A resolver that does not, such as a distant corporate or public one, makes "closest" a guess.

Second, the answer is cached. Every resolver along the way keeps it until its TTL runs out. That makes DNS cheap. It also makes changing your mind slow.

Client ── DNS lookup ──> authoritative DNS ── returns origin IP
Client ── HTTP request ──────────────────────> that origin ── 302

After the lookup, nothing sits between the visitor and the origin. Every redirect is a full round trip to it, handled by your application.

What an edge POP does

An edge POP runs the redirect service itself, in several regions, with a cache in front of the data. A request lands on the nearest POP, the slug is looked up locally, and the 302 goes back. Only a cache miss makes a trip to the origin.

How visitors reach the nearest POP is a separate decision. One way is anycast, where the same address is announced from several sites and the network delivers each packet to the closest one. Another is GeoDNS, which is the DNS routing above pointed at POPs instead of origins. Many fleets combine them. This post is about the POP, the cache and the origin behind it, which is where the latency difference comes from.

Elido's production today is a single host running the edge-redirect service; a multi-region edge (Europe, US East and Asia-Pacific) is planned, not live, and the design is that every POP would run the same binary. The repository documents a design budget for the service: p50 5ms and p95 15ms on a cache hit, measured at the edge and excluding a full TLS handshake. It is a budget, not a published measurement. That number is server-side time. It does not include the network trip from the visitor to the POP, and it is the part a cache removes.

Distance is the part nobody can tune

The strongest argument for edge POPs is arithmetic. Light in optical fibre travels at roughly two thirds of its vacuum speed, about 200,000 km/s, so each 100 km of cable costs about 1ms of round trip before any equipment is involved. Real routes are longer than great-circle distances, so these are floors, not predictions.

Take a visitor in Sydney. A single origin in Western Europe is about 16,000 km away, which puts the floor near 160ms per round trip. The nearest Southeast Asian region is about 6,300 km away, a floor near 63ms. Both are a lot more than the 5ms a cache hit costs on the server, and a POP in the visitor's own country brings the network part down to a few milliseconds.

A page load needs more than one round trip: a TCP handshake, a TLS handshake, then the request. The distance is paid several times before the redirect is even sent, which is why moving the termination point closer helps more than shaving server time. DNS-only routing can reduce this too, if you run origins near your visitors. What it cannot do is skip the application work. Each request still runs your redirect code, reads your database or cache, and uses your bandwidth.

Failover: TTLs against route withdrawal

DNS failover depends on cached answers expiring. If an origin dies, resolvers keep sending visitors to it until the TTL runs out, and some resolvers hold records longer than the TTL says. Health checks at the DNS provider shorten the window by changing the answer, but they cannot reach caches that already hold the old one.

Anycast failover works at the routing layer. When a site stops announcing the address, routers converge on the next-nearest site. That is usually quicker than waiting for TTLs, but it is not instant, and the speed depends on the network and on how fast a failing site is detected and withdrawn. For short links printed on packaging or posted in ads, either design needs a plan for the minutes when a region is down.

One edge-specific safeguard is in the code. If the shared cache is unavailable, the resolver treats it as best-effort and falls back to the in-process cache plus the origin, so an edge node degrades instead of failing.

The cache is where the speed comes from

A short link maps a small key to a small value, and traffic concentrates on a few hot slugs. That suits caching. In Elido the resolver checks an in-process LRU first (L1, up to 100,000 entries, 60 second TTL), then a shared in-memory cache (L2, 5 minute TTL), then the origin over gRPC. A miss fills both layers.

Lookup path inside an edge region: the request checks the in-process L1 cache with a 60 second TTL, then the shared L2 cache with a 5 minute TTL, then calls the origin over gRPC on a miss.

The cost of that speed is staleness.

The edge code has no cross-region message that clears a slug when it is edited, so a changed destination reaches a region when its cached copy expires. In the worst case that is 60 seconds for L1, and up to 5 minutes if L2 still holds the old copy. Redirects are sent with Cache-Control: private, max-age=0, no-store, so browsers do not add their own cache on top. The default status is 302, with 301 and 307 available per link, which matters here: a 301 would let browsers cache the old destination as well. The 301 vs 302 guide covers that trade.

For campaigns with exact timing, plan around the window. Change the link a few minutes before the switch, not at the moment of it. The cache strategy post goes deeper on tiers and eviction.

Side by side

QuestionDNS-only routingEdge POP routing
Who picks the destinationResolver, at lookup timeNetwork or DNS to the POP, then a local cache
Work per redirectFull application request at the originCache hit at the POP, origin only on a miss
Distance paidVisitor to origin, every requestVisitor to nearest POP; origin only on a miss
FailoverWaits for cached DNS answers to expireRoute withdrawal, then convergence
Edit visibilityImmediate at the originAfter cache expiry (60s L1, 5 min L2 here)
Extra operationsLittle: DNS records and health checksSeveral regions, cache layers, TLS at the edge
DNS-only routing picks an origin at lookup time and caches that answer for the TTL, while edge POP routing serves a hit from the nearest edge region cache and calls the origin only on a miss.

What edge POPs do not fix

Three cases get little from an edge fleet.

Writes. Creating a link or changing a destination goes to the authoritative service. A POP does not make that faster, and it does not need to, because writes are rare next to reads.

Uncacheable redirects. Anything that depends on state outside the cached link record has to call out. Elido avoids this for targeting rules: country, device and language rules are evaluated on the cached link record for each request. The visitor's country comes from an upstream header such as X-Country or CF-IPCountry when present, and from a local GeoIP database otherwise. Because the rules run after the lookup, a link with ten country variants is still one cache entry. Designs that put the country in the cache key store ten copies per slug and lose hit rate.

Low or regional traffic. With one origin and most visitors in the same region, the distance is already short, and extra regions only add things to operate and monitor. The same goes for very low volume, where a fleet of caches mostly sits idle.

How to choose

  • One origin and visitors in one region: use DNS and one well-placed origin. A cache fleet buys little here.
  • Several regional origins and no caching layer: DNS latency routing gets visitors a nearby server. You still pay application work on every redirect.
  • Visitors on several continents, mostly repeat reads: edge POPs. The distance saving and the cache hit rate both work in your favour.
  • Edits that must show instantly everywhere: keep TTLs short or skip the edge cache for those links, and accept the extra origin traffic.
  • Tight failover needs: compare both mechanisms against your own measured recovery time, not a vendor's description.

I did not benchmark the two designs for this post. The latency figures above are the repository's documented budget and distance arithmetic, labelled as such. If you are deciding for your own service, measure from the locations your visitors actually use.

Frequently asked questions

What is the difference between an edge POP and DNS-only routing?

DNS-only routing chooses an origin when the client resolves the hostname, and every request then travels to that origin. An edge POP puts a cache close to the visitor, so a repeat request is answered locally and the origin is contacted only on a miss. DNS decides where a request goes; a POP cache decides whether it has to go there at all. The two are not exclusive, and many deployments use DNS to pick the region and caches to avoid the origin trip.

Does DNS-only routing make redirects slower?

It can, for visitors far from the origin. With one origin, every redirect pays the full network round trip to it, and no DNS setting changes that distance. With several regional origins and latency-based DNS, visitors get a nearby origin but still hit the application on every request, so the cost shows up as origin compute and bandwidth rather than distance. The difference matters most for visitors on other continents.

How fast does failover work with DNS compared with anycast?

DNS failover is limited by how long resolvers keep the old answer, which is set by the record TTL and by resolvers that ignore low TTLs. Anycast failover happens in routing: when a site stops announcing the address, traffic moves to the next-nearest site once routes converge. Neither is instant. DNS can leave stragglers on a dead address for a long time, while routing convergence is usually faster but depends on the network and on how quickly a failing site is withdrawn.

Does an edge cache make short link edits show up late?

It can. A cached copy keeps being served until it expires or is invalidated. In Elido's edge code the in-process copy lives 60 seconds and the shared cache copy 5 minutes, so an edited destination can lag by up to that window wherever a cache already holds the old one. Redirects are sent with no-store headers, so browsers do not add a further cache on top.

Do geo-targeting and device rules break edge caching?

Not if the rules are evaluated after the cache lookup. Elido caches one record per host and slug, then applies country, device and language rules to that record for each request, so rules do not multiply cache entries. The design fails when the cache key itself includes the visitor's country, because then each slug is stored once per country and the hit rate falls.

When is DNS-only routing the right choice for a shortener?

When traffic is concentrated in one region, there is one origin, volume is low, or most redirects depend on per-request state that cannot be cached. In those cases extra cache layers add operations work for little latency gain. Start with DNS and a single well-placed origin, and add edge caches when visitors spread across continents or the origin starts to carry load that a cache would absorb.

Try Elido

Paste a URL, get a working short link

No signup. Link lives for 30 days. Sign up to keep it forever.

Free account required. The free plan includes 25 links in total. Already have an account? Log in

Try Elido

EU-hosted URL shortener with custom domains, deep analytics, and an open API. Free tier - no credit card.

Tags
edge pop vs dns
anycast vs dns failover
edge routing latency
geodns vs anycast
url shortener performance
redirect latency

Continue reading