HLDArena
HLD-419·Caching & Edge
Expert · 2,000 pts

Planet-Scale Edge CDN Surrogate-Key Purge & Origin Shield Mesh

Design a Fastly / Akamai-scale global cache invalidation and tiered Origin Shield control plane capable of purging surrogate cache-tags across 300+ edge POPs in < 150 ms while collapsing post-purge cold-miss herds so customer origins never melt down.

Max p99
≤ 45 ms
Availability
≥ 99.7%
Budget
≤ $11,200

Functional Requirements

  • FR-1POST /v1/zones/{zone_id}/purge-tags — Assigns monotonic purge generation to surrogate_tag and fans out invalidation gossip tree to all POPs.
  • FR-2GET /v1/edge/{zone_id}/fetch — Serves edge/shield cached object if generation > tag_watermarks, coalescing cold misses via tiered Origin Shield.
  • FR-3PUT /v1/zones/{zone_id}/shield-policy — Updates stale-while-revalidate / stale-if-error rules and origin concurrency caps.
  • FR-4Breaking-news mass tag purges at 260k+ RPS must propagate globally without triggering an origin thundering herd or breaching p99 <= 45 ms.

Workload Profile

Global Edge Traffic96,000 Shield/Edge Lookup RPS / 4,500 Tag Purge & Policy Write RPS
Breaking Election / Score Purge Storm252,000 Read RPS / 12,000 Tag Purge Write RPS
Active Working Set52 GB surrogate-tag generation bloom/version tables & shield hot objects
Shield InvariantHierarchical miss coalescing + stale-if-error survival during 8x origin brownouts

Consistency Model

Monotonic per-zone surrogate-tag generation numbers ensuring a purged POP/shield never overwrites cache with an older in-flight origin response.

Relevant practice for

Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.

Design Write-up

Write under ### Architecture for Diagram to take that up directly

Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 90 ms
• Availability: ≥ 99.7%
Valid end-to-end Client → Compute → Storage topology