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
≤ $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
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.
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