HLD-245·Caching & Consistency
Medium · 1,000 pts"Who Viewed Your Profile" Aggregation & Privacy Feed
Design a LinkedIn-style profile-view tracking and viewer-insight feed that deduplicates repeated visits within rolling windows, enforces anonymous/semi-private viewer privacy modes, and serves instant 90-day trend counts.
Max p99
≤ 52 ms
Availability
≥ 99.6%
Budget
≤ $6,850
Functional Requirements
- FR-1POST /v1/profiles/{target_user_id}/views — Records viewer impression asynchronously with rolling-window deduplication.
- FR-2GET /v1/profiles/{target_user_id}/viewers — Returns paginated recent viewers (masked per viewer privacy tier) and 90-day trend sparkline.
- FR-3PATCH /v1/users/{viewer_id}/privacy-mode — Updates viewer visibility mode (full profile, semi-private title, or anonymous) for impressions.
- FR-4High-profile executive and creator pages must absorb viral view bursts without hot-partitioning storage.
Workload Profile
Business-Hours Browsing30,000 Viewer Feed Read RPS / 11,000 Impression Write RPS
Viral Hiring Post Surge82,000 Read RPS / 28,000 Impression Write RPS
Active Working Set26 GB recent 90-day viewer rings, dedup bloom/keys & privacy flags
Traffic DistributionExtreme write/read skew on viral recruiter & executive target_user_id
Consistency Model
Buffered eventual (< 5s) impression rollup and deduplication; privacy mode changes reflected on read hydration.
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