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

Container & NPM Package Tarball Registry Mirror

Design an immutable package registry and tarball download mirror absorbing morning CI/CD dependency install storms while shielding slow object storage.

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

Functional Requirements

  • FR-1PUT /packages/{pkg_hash} — Publishes content-addressed package tarball and manifest.
  • FR-2GET /packages/{pkg_hash} — Streams cached tarball bytes to CI build runners.
  • FR-3Retention & Lifecycle (pkg_hash) — Enforces TTL retention windows, deduplication, or archival compaction without blocking live reads or writes.
  • FR-4Must sustain download throughput when origin blob storage suffers a 5x latency brownout.

Workload Profile

Baseline CI Builds24,000 Read RPS / 800 Publish Write RPS
Morning CI Storm76,000 Read RPS / 2,000 Write RPS
Active Working Set22 GB top popular package versions (60 TB archive)
Traffic DistributionExtreme Zipfian skew on popular base pkg_hash tarballs

Consistency Model

Content-addressed immutable tarballs with eventual edge propagation (< 5s); published manifests must be durable.

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
2,000 rps
Write RPS
100 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 90 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology