HLD-123·Storage & Caching
Easy · 500 ptsMobile 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
≤ $2,550
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.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words