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

Event QR Badge Lookup & Gate Check-In API

Design a stadium and conference gate check-in service validating scanned QR attendee badges at turnstiles with sub-30ms tail latency when venue doors open.

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

Functional Requirements

  • FR-1POST /badges — Issues signed QR badge metadata for a registered attendee.
  • FR-2GET /badges/{badge_id} — Verifies ticket entitlement and gate access zone at turnstile scanners.
  • FR-3PATCH & DELETE /badges/{badge_id} — Updates, revokes, or deletes badge_id entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Turnstile scans must remain fast and available if the primary badge database crashes.

Workload Profile

Early-Bird Scans16,000 Read RPS / 2,500 Check-In Write RPS
Doors-Open Peak48,000 Read RPS / 8,000 Write RPS
Active Working Set6 GB active event badge records
Traffic DistributionBurst skew on active gate badge_id prefixes

Consistency Model

Bounded eventual replication (< 2s) across scanner POPs acceptable; newly issued badges 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
1,600 rps
Write RPS
250 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