CDN Architecture By Priya Sharma, Content Delivery Specialist • • 8 min read

CDN Regional Edge Cache Design: Balancing Latency and Cache Efficiency

Edge PoPs deliver sub-20ms latency but suffer from cache fragmentation. Regional edge caches fix that by aggregating demand — if you size, place, and tune them correctly. Here’s how to design the middle tier without sacrificing speed.

In this article
  1. Why Edge-Only Architectures Fail at Scale
  2. Anatomy of a Regional Edge Tier
  3. The Latency vs. Hit Ratio Tradeoff
  4. Design Patterns: Sizing, Placement & Routing
  5. Measuring and Tuning for Efficiency
  6. FAQ

A well-designed CDN looks simple from the outside: users hit the nearest Point of Presence (PoP), get a cached response, and move on. Inside, the challenge is cache efficiency. With 300+ edge PoPs each seeing a thin slice of the global working set, the same object is fetched from origin dozens of times. Origin egress spikes, hit ratio stalls at 85-90%, and long-tail content never stays warm.

The regional edge cache — sometimes called mid-tier, shield, or L2 cache — solves this by inserting a larger, highly available aggregation layer between the edge and origin. Done right, it lifts overall hit ratio to 96-98%, cuts origin requests by 60-80%, and actually improves average Time to First Byte (TTFB). Done wrong, it adds latency, complexity, and a single point of failure. This guide covers the architecture, tradeoffs, and operational patterns we use to balance both goals.

If you’re new to tiered caching, start with our CDN architecture overview before diving into regional design.

1. Why Edge-Only Architectures Fail at Scale

In a flat architecture, every edge PoP fetches directly from origin on a miss. For a site with 500K unique cacheable URLs and 400 PoPs, the math is brutal. Even with consistent hashing, each PoP independently caches what its local users request. A video segment popular in Berlin may be hot in FRA and AMS but cold in 390 other PoPs. When traffic shifts, those cold PoPs all miss at once — a thundering herd.

Three problems compound:

Adding a regional tier consolidates those misses. Instead of 400 PoPs calling origin, 400 PoPs call 8-12 regional caches, which then coalesce requests to origin. This is known as request collapsing or origin shielding. The regional cache holds an order of magnitude more objects for longer, serving as the system’s memory.

Rule of thumb: If your origin egress exceeds 15% of edge egress, or your edge hit ratio plateaus below 93% despite adequate TTLs, you need a regional tier. Below that, tuning caching strategies and TTLs may be enough.

2. Anatomy of a Regional Edge Tier

A regional edge is not just a bigger PoP. It differs in hardware, software, placement, and consistency model.

Performance Comparison: Edge vs Origin Processing
Metric Edge Processing Origin Processing Improvement
Latency (p50)8–15 ms120–300 ms15–20x faster
Cache Hit Ratio85–95%N/AReduces origin load
TLS Handshake1–5 ms (nearby PoP)50–150 ms10–30x faster
Bandwidth Cost$0.01–0.04/GB$0.05–0.12/GB3–5x cheaper
Availability99.99% (multi-PoP)99.9% (single DC)10x fewer outages

Key design choices:

Security and transport matter here too. Terminate TLS at the edge, but maintain persistent, optimized connections from edge to regional and regional to origin. For protocol choices between tiers, see our guide to HTTP/2, HTTP/3 and QUIC, and ensure your SSL/TLS configuration supports session reuse across tiers to avoid handshake overhead.

3. The Latency vs. Hit Ratio Tradeoff

The central tension is simple: every extra hop adds latency on a miss, but dramatically reduces how often you miss. The goal is to minimize weighted latency, not just best-case latency.

Consider a request path with these typical RTTs: User→Edge 15ms, Edge→Regional 25ms, Regional→Origin 60ms. A hit at edge costs ~15ms. A hit at regional costs ~40ms. A miss to origin via regional costs ~100ms, versus ~75ms direct to origin. The regional path is slower when it misses, but misses far less often.

Tier Typical RTT Added Working Set Hit Ratio (Alone) Effective System Hit Ratio Best For
Edge PoP Only 0 ms (baseline) 50–200 GB 85–92% 85–92% Ultra-low latency, hot objects
Edge + Regional +20–35 ms on regional hit 5–50 TB regional 95–98% combined 96–98% Balanced latency & efficiency
Edge + Regional + Origin Shield +5 ms shield hop Full origin dataset 99%+ with shield 99%+ Origin protection, high egress cost
Direct Edge→Origin (no regional) — Limited — Lower tail hit ratio Small sites, low traffic

Weighted average TTFB tells the story: With 90% edge hit ratio and 75ms origin miss, average = 0.9×15 + 0.1×75 = 21ms. With regional (90% edge hit, 70% regional hit on the remaining 10%, 100ms full miss), average = 0.9×15 + 0.07×40 + 0.03×100 = 19.3ms — faster overall despite the extra hop.

To keep that math favorable, you must optimize two things: regional hit ratio (via larger cache and smarter keys) and regional latency (via placement and persistent connections). Track this with the metrics in our CDN performance metrics guide — especially P50/P95 TTFB segmented by cache status (HIT, HIT-Regional, MISS).

4. Design Patterns: Sizing, Placement & Routing

Placement strategy

Place regional edges near your origin and near major traffic basins, not equidistant. For a US-centric origin in Virginia, ideal regions are US-East (Ashburn), US-West (Oregon), EU-West (Dublin), and APAC-Southeast (Singapore). Each edge PoP maps to the nearest regional with a failover to the next-nearest. This keeps Edge→Regional RTT under 40ms for 95% of users while keeping Regional→Origin RTT low for revalidation.

Avoid placing a regional in every edge city — you’ll recreate fragmentation. And avoid a single global regional — you’ll add 100ms+ for distant edges. The sweet spot is 1 regional per 30-50 edge PoPs.

Sizing for working set

Size regional storage to hold 1.5–2× your 7-day cacheable working set. Estimate this from origin logs: sum of unique URL + Vary combinations with Cache-Control: public, max-age>0 over 7 days, multiplied by average object size. For many media sites, that’s 10–30 TB. Provision 20% headroom for burst and 2× for replication if you run active-active pairs.

Memory matters more than disk at the regional tier. Allocate at least 64–128 GB for keys and metadata — a 20 TB cache with 250 KB average object size holds 80M keys.

Cache key normalization and TTL layering

The biggest efficiency win is key normalization. Edges may vary on Accept-Language or User-Agent, but the regional should collapse where safe. Use tiered TTLs: short at edge, long at regional.

# Regional edge - nginx example: large, long-lived cache
proxy_cache_path /data/regional levels=1:2 keys_zone=REGIONAL:256m
                 inactive=7d max_size=30t use_temp_path=off
                 manager_files=500 manager_sleep=50ms;

# Edge PoP - smaller, shorter TTL, collapse to regional
proxy_cache_path /data/edge levels=1:2 keys_zone=EDGE:32m
                 inactive=6h max_size=400g;

# Normalized key at regional: strip edge-specific vary
map $http_accept_encoding $cache_key_encoding {
    "~*br"  "br";
    "~*gzip" "gzip";
    default "";
}
proxy_cache_key "$scheme$host$request_uri|$cache_key_encoding";

# Tiered TTLs + stale serving
proxy_cache_valid 200 302 1h;           # edge: 1 hour
proxy_cache_valid 404 1m;
proxy_cache_use_stale error timeout updating
                      http_500 http_502 http_503 http_504;
proxy_cache_background_update on;
proxy_cache_lock on;                   # collapsed forwarding
add_header X-Cache-Status $upstream_cache_status always;
# Origin response headers for tiered behavior
HTTP/1.1 200 OK
Cache-Control: public, max-age=60, s-maxage=86400
              stale-while-revalidate=300, stale-if-error=86400
CDN-Cache-Control: max-age=3600  # edge honors this if present
Surrogate-Key: product/12345 collection/shoes
Vary: Accept-Encoding

This pattern lets the edge revalidate every hour but the regional serves stale for up to a day while revalidating in background, so users never wait on a synchronous origin fetch. Purge by Surrogate-Key propagates regional→edge in seconds.

Tip: Enable proxy_cache_lock and proxy_cache_background_update at both tiers. Without lock, 100 concurrent misses for the same cold object will fan out to 100 origin requests. With lock, only one fetch proceeds; others wait or get stale.

5. Measuring and Tuning for Efficiency

You can’t balance what you don’t measure. Segment these metrics by PoP, region, and cache status:

Tune iteratively: First, increase regional inactive and max_size until byte hit ratio plateaus. Second, normalize keys — audit Vary headers and query string ordering. Third, enable tiered stale-while-revalidate to hide revalidation latency. Finally, review placement — if an edge’s Regional RTT exceeds 60ms, remap it to a closer regional.

For a full observability checklist, pair this with your performance metrics dashboard and synthetic tests from each major geography.

Regional edge design is not set-and-forget. Traffic shifts, catalogs grow, and origins move. Re-evaluate working set size quarterly and failover mapping after any PoP expansion. When done well, the regional tier becomes invisible — users see lower latency, origins see less load, and your cache efficiency finally scales with your footprint.

Frequently Asked Questions

What is the difference between an edge PoP and a regional edge cache?
An edge PoP is a small, widely distributed cache (300+ locations) optimized for minimal RTT to users, holding hot objects for minutes to hours. A regional edge is a larger aggregation tier (8–12 locations) that collects misses from many edges, holds terabytes of data for days, and shields origin via collapsed forwarding. Edge is about latency; regional is about hit ratio and origin protection.
How many regional edge locations do I need?
Most global deployments use 6–12 regionals — e.g., US-East, US-West, EU-Central, EU-West, APAC-Northeast, and APAC-Southeast. Start with one per continent where you have meaningful traffic, then add based on origin egress, P95 fetch latency, and cache hit ratio. One regional per 30–50 edge PoPs is a proven ratio.
Does adding a regional tier increase TTFB for cache misses?
For the small fraction that miss at both edge and regional, yes — typically 5–15 ms extra versus direct edge-to-origin. But because regional hits absorb 40–70% of edge misses, the weighted average TTFB drops. Use request collapsing, persistent connections, and stale-while-revalidate to keep the penalty minimal.
What cache key strategy works best with regional edges?
Normalize keys at the regional tier: include only content-determining parts (host, path, query, encoding) and strip edge-specific Vary values like User-Agent where safe. Use tiered TTLs — short max-age at edge (e.g., 1 hour) and long s-maxage at regional (e.g., 24 hours) plus stale-while-revalidate — to maximize hits without serving stale content.

References & Standards: RFC 7234 · HTTP/2 specification

External References