HLD-242·Geo & Telemetry
Medium · 1,000 ptsFitness GPS Activity Stream & Route Segment Leaderboard
Design a Strava-style workout ingestion and route-segment matching backend that stores compressed GPS polyline streams, detects traversed climb/sprint segments asynchronously, and updates ranked KOM/QOM leaderboards.
Max p99
≤ 52 ms
Availability
≥ 99.6%
Budget
≤ $5,300
Functional Requirements
- FR-1POST /v1/activities — Uploads workout metadata + GPS telemetry stream and enqueues asynchronous spatial segment matching.
- FR-2GET /v1/segments/{segment_id}/leaderboard — Returns top overall, age-group, and friend effort times for a popular road/trail segment.
- FR-3DELETE /v1/activities/{activity_id} — Removes deleted or privacy-flagged workouts and purges their efforts from segment leaderboards.
- FR-4Must absorb Sunday-morning marathon upload bursts without degrading live segment leaderboard and feed reads.
Workload Profile
Weekday Workouts32,000 Feed & Segment Read RPS / 5,200 GPS Upload Write RPS
Weekend Marathon Finish Surge86,000 Read RPS / 15,000 Upload Write RPS
Active Working Set28 GB hot segment sorted leaderboards & spatial bounding-box index
Traffic DistributionHeavy Zipfian skew on iconic city park & climb segment_id boards
Consistency Model
Immediate activity receipt with bounded eventual (< 5s) async segment-effort matching and leaderboard rank updates.
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