HLDArena
HLD-118·Storage & Media
Easy · 500 pts

Chat URL OpenGraph Metadata & Preview Cache

Design a link-unfurling metadata service that caches OpenGraph titles, descriptions, and preview thumbnails when links go viral across messaging channels.

Max p99
≤ 50 ms
Availability
≥ 99.5%
Budget
≤ $2,200

Functional Requirements

  • FR-1POST /unfurl — Enqueues or stores extracted OpenGraph metadata for a shared URL.
  • FR-2GET /unfurl/{url_hash} — Serves cached title, summary, and thumbnail URL to chat clients.
  • FR-3PATCH & DELETE /unfurl/{url_hash} — Updates, revokes, or deletes url_hash entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must absorb viral link storms and isolate 5x backing storage latency spikes.

Workload Profile

Baseline Shares18,000 Read RPS / 1,600 Unfurl Write RPS
Breaking Link Surge53,500 Read RPS / 4,500 Write RPS
Active Working Set14 GB hot URL preview cards
Traffic DistributionStrong Zipfian skew on trending url_hash links

Consistency Model

Eventual metadata refresh acceptable; coalescing prevents duplicate scrapes of viral links.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
1,800 rps
Write RPS
160 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 100 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology