HLDArena
HLD-123·Storage & Caching
Easy · 500 pts

Mobile APNs / FCM Device Token & Topic Registry

Design a mobile device-token registration and topic fan-out lookup store queried by notification workers during breaking-news broadcasts.

Max p99
≤ 45 ms
Availability
≥ 99.5%
Budget
≤ $3,950

Functional Requirements

  • FR-1PUT /devices/{user_id}/tokens — Upserts APNs/FCM push token and app locale on app launch.
  • FR-2GET /devices/{user_id}/tokens — Fetches active push tokens for outbound alert delivery.
  • FR-3PATCH & DELETE /devices/{user_id}/tokens — Updates, revokes, or deletes user_id entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must remain available across single storage node failures.

Workload Profile

Baseline App Opens19,000 Read RPS / 3,200 Token Upsert RPS
Morning Push Broadcast54,000 Read RPS / 8,500 Upsert RPS
Active Working Set14 GB active user token mappings
Traffic DistributionSkewed lookups on active user_id cohorts

Consistency Model

Eventual token propagation (< 5s) acceptable; invalid tokens pruned asynchronously.

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
1,900 rps
Write RPS
320 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