HLD-217·Caching & Edge
Medium · 1,000 ptsSticky A/B Experiment Assignment & Exposure Log
Design an experimentation bucketing and sticky-override service ensuring users always see a consistent treatment arm across requests while logging exposures.
Max p99
≤ 42 ms
Availability
≥ 99.5%
Budget
≤ $5,100
Functional Requirements
- FR-1GET /experiments/{user_id}/assign — Returns sticky variant assignments across active studies under 32ms p99.
- FR-2POST /experiments/{user_id}/override — Persists sticky holdout/QA overrides and logs exposure events.
- FR-3PATCH & DELETE /experiments/{user_id}/assign — Updates, cancels, or deletes user_id records and immediately invalidates or updates cached state (read-after-write).
- FR-4Sticky overrides must be visible immediately on the next request (read-after-write) and survive DB failover.
Workload Profile
Baseline Bucketing44,000 Read RPS / 5,000 Exposure/Override Write RPS
Homepage Ramp Surge122,000 Read RPS / 16,000 Write RPS
Active Working Set20 GB active sticky assignments & layer configs
Latency BudgetInline request-path dependency p99 <= 32 ms
Consistency Model
Read-after-write consistency required for sticky variant overrides so users never flip between arms.
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