HLD-215·Caching & Consistency
Medium · 1,000 ptsIn-App Notification Inbox & Unread Badge Store
Design an in-app notification center serving bell-icon unread counts and paginated inbox items where marking notifications read immediately clears the badge.
Max p99
≤ 40 ms
Availability
≥ 99.5%
Budget
≤ $4,900
Functional Requirements
- FR-1POST /inbox/{user_id}/read — Marks notification IDs as read or appends new inbox items.
- FR-2GET /inbox/{user_id} — Returns unread badge count and top-25 recent notifications.
- FR-3PATCH & DELETE /inbox/{user_id}/read — Updates, cancels, or deletes user_id records and immediately invalidates or updates cached state (read-after-write).
- FR-4Clearing unread notifications must immediately return 0 unread on refresh (read-after-write).
Workload Profile
Baseline App Opens38,000 Read RPS / 6,000 Inbox Write RPS
Breaking Push Surge104,000 Read RPS / 20,000 Write RPS
Active Working Set22 GB active unread counters & recent inbox slices
Fault ScenarioPrimary inbox database crash in Wave 3
Consistency Model
Read-after-write consistency required so dismissed unread badges never reappear from stale cache.
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