HLDArena
HLD-111·Caching & Edge
Easy · 500 pts

User Profile Card & Avatar Metadata Service

Design a foundational user profile microservice hydrating display names, handles, and avatar URLs across internal services on every page render.

Max p99
≤ 30 ms
Availability
≥ 99.5%
Budget
≤ $2,200

Functional Requirements

  • FR-1GET /users/{user_id}/profile — Fetches public display name, bio, verification badge, and avatar URL.
  • FR-2PATCH /users/{user_id}/profile — Creates or updates profile attributes and persists changes.
  • FR-3DELETE /users/{user_id}/avatar — Deletes custom avatars or deactivates profiles while invalidating cached profile cards.
  • FR-4Must survive a primary profile database node crash without breaking upstream page renders.

Workload Profile

Baseline Hydrations22,000 Read RPS / 1,100 Profile Write RPS
Prime-Time Peak71,000 Read RPS / 3,000 Write RPS
Active Working Set14 GB active user profile cards
Traffic DistributionZipfian read skew on popular creator user_id profiles

Consistency Model

Eventual profile card propagation (< 5s TTL/async update) acceptable; profile edits must persist durably.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
110 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 60 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology