PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/TikTok

Design a high-concurrency ticketing system

Last updated: Jun 15, 2026

Quick Overview

TikTok software-engineer system-design interview question: design a high-concurrency ticketing / flash-sale system that survives millions of concurrent purchase attempts with zero oversell. It tests admission control and fairness (virtual waiting room, FIFO vs lottery), atomic inventory allocation with TTL reservations, anti-bot defenses, idempotent order creation, hot-key sharding, the data model and APIs, caching, message queues and delivery semantics, consistency and reconciliation, failure handling, capacity planning, SLOs, load testing, and monitoring.

  • hard
  • TikTok
  • System Design
  • Software Engineer

Design a high-concurrency ticketing system

Company: TikTok

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

##### Question Design a high-concurrency ticketing / flash-sale system for limited inventory (e.g. tickets to a popular concert with a fixed number of seats). At on-sale time the system must absorb sudden spikes of up to millions of concurrent purchase attempts per second while guaranteeing inventory correctness. Cover the following: 1. **Admission control & fairness.** Handle the stampede with a virtual waiting room / queue. Choose and justify a fairness model (FIFO by arrival, or a lottery), and explain rate limiting, token buckets, and backpressure so that admission rate matches backend capacity rather than incoming traffic. 2. **No oversell.** Guarantee strict inventory correctness with zero oversell for both general-admission (count-only) and reserved-seating (specific seats) modes. Explain reservation vs. immediate deduction, short-lived reservations with payment timeouts (TTL), and how seats/units are released on expiry or cancellation. 3. **Anti-bot & abuse.** Describe bot mitigation (WAF, device fingerprinting, CAPTCHA / proof-of-work, behavioral signals), token binding, and per-identity purchase quotas (e.g. max 2-4 tickets per account/device/card). 4. **Idempotent order creation & safe retries.** Make order/reservation creation idempotent (idempotency keys) so client retries and duplicate webhooks never double-charge or double-allocate. 5. **Hot-key sharding.** Avoid a single global counter hot spot. Explain how you shard inventory across keys/shards and spread load (e.g. token lists per shard, hash-tagged Redis keys, seat bitmaps). 6. **APIs.** Sketch the key endpoints (join queue, poll queue status, acquire reservation, create order, payment callback, cancel reservation, get availability / order status), including idempotency headers and standardized error codes. 7. **Data model & partitioning.** Define the entities (events, SKUs/seats, reservations, orders, payments, idempotency) and the partition/shard keys for the durable store and for the Redis hot path. 8. **Caching, read/write paths & real-time availability.** Explain cache usage (Redis cluster as the in-sale authoritative allocator), the read path for real-time availability (polling vs. WebSocket/SSE), and the write path from queue to reservation to paid order. 9. **Message queues & delivery semantics.** Use an async bus (Kafka/Pulsar/SQS) for decoupling, retries, and DLQs; explain at-least-once delivery, idempotent consumers, and the transactional outbox/inbox pattern. 10. **Consistency model & reconciliation.** State your consistency choices (strong for allocation via atomic ops, eventual for availability reads), the role of the DB as durable ledger vs. Redis as allocator, and how you periodically reconcile the two. 11. **Failure handling & degradation.** Cover timeouts, retries with backoff/jitter, circuit breakers, brownout modes, Redis/DB/PSP failure handling, and reservation-expiry reapers. 12. **Capacity planning, SLOs & load testing.** Provide concrete capacity estimates (QPS, admission rate, Redis/DB/queue sizing), latency targets (p99), and a load-testing / chaos-testing plan that proves zero oversell under extreme load. 13. **Monitoring & alerting.** List the key metrics (oversell count, queue backlog, reservation expiry rate, latency quantiles, DLQ depth, payment success rate) and the alert thresholds. Note: the company is TikTok (a consumer app / content platform); treat this as a generic flash-sale / limited-inventory design problem, not a specific TikTok product.

Quick Answer: TikTok software-engineer system-design interview question: design a high-concurrency ticketing / flash-sale system that survives millions of concurrent purchase attempts with zero oversell. It tests admission control and fairness (virtual waiting room, FIFO vs lottery), atomic inventory allocation with TTL reservations, anti-bot defenses, idempotent order creation, hot-key sharding, the data model and APIs, caching, message queues and delivery semantics, consistency and reconciliation, failure handling, capacity planning, SLOs, load testing, and monitoring.

Related Interview Questions

  • Choose tools for scalable distributed systems - TikTok (medium)
  • Design a distributed key-value store - TikTok (medium)
  • Design a content moderation system - TikTok (medium)
  • Design low-latency large-scale hotel booking system - TikTok (medium)
  • Explain SRE architecture and troubleshooting scenarios - TikTok (hard)
|Home/System Design/TikTok

Design a high-concurrency ticketing system

TikTok logo
TikTok
Sep 6, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenSystem Design
11
0
Question

Design a high-concurrency ticketing / flash-sale system for limited inventory (e.g. tickets to a popular concert with a fixed number of seats). At on-sale time the system must absorb sudden spikes of up to millions of concurrent purchase attempts per second while guaranteeing inventory correctness. Cover the following:

  1. Admission control & fairness. Handle the stampede with a virtual waiting room / queue. Choose and justify a fairness model (FIFO by arrival, or a lottery), and explain rate limiting, token buckets, and backpressure so that admission rate matches backend capacity rather than incoming traffic.
  2. No oversell. Guarantee strict inventory correctness with zero oversell for both general-admission (count-only) and reserved-seating (specific seats) modes. Explain reservation vs. immediate deduction, short-lived reservations with payment timeouts (TTL), and how seats/units are released on expiry or cancellation.
  3. Anti-bot & abuse. Describe bot mitigation (WAF, device fingerprinting, CAPTCHA / proof-of-work, behavioral signals), token binding, and per-identity purchase quotas (e.g. max 2-4 tickets per account/device/card).
  4. Idempotent order creation & safe retries. Make order/reservation creation idempotent (idempotency keys) so client retries and duplicate webhooks never double-charge or double-allocate.
  5. Hot-key sharding. Avoid a single global counter hot spot. Explain how you shard inventory across keys/shards and spread load (e.g. token lists per shard, hash-tagged Redis keys, seat bitmaps).
  6. APIs. Sketch the key endpoints (join queue, poll queue status, acquire reservation, create order, payment callback, cancel reservation, get availability / order status), including idempotency headers and standardized error codes.
  7. Data model & partitioning. Define the entities (events, SKUs/seats, reservations, orders, payments, idempotency) and the partition/shard keys for the durable store and for the Redis hot path.
  8. Caching, read/write paths & real-time availability. Explain cache usage (Redis cluster as the in-sale authoritative allocator), the read path for real-time availability (polling vs. WebSocket/SSE), and the write path from queue to reservation to paid order.
  9. Message queues & delivery semantics. Use an async bus (Kafka/Pulsar/SQS) for decoupling, retries, and DLQs; explain at-least-once delivery, idempotent consumers, and the transactional outbox/inbox pattern.
  10. Consistency model & reconciliation. State your consistency choices (strong for allocation via atomic ops, eventual for availability reads), the role of the DB as durable ledger vs. Redis as allocator, and how you periodically reconcile the two.
  11. Failure handling & degradation. Cover timeouts, retries with backoff/jitter, circuit breakers, brownout modes, Redis/DB/PSP failure handling, and reservation-expiry reapers.
  12. Capacity planning, SLOs & load testing. Provide concrete capacity estimates (QPS, admission rate, Redis/DB/queue sizing), latency targets (p99), and a load-testing / chaos-testing plan that proves zero oversell under extreme load.
  13. Monitoring & alerting. List the key metrics (oversell count, queue backlog, reservation expiry rate, latency quantiles, DLQ depth, payment success rate) and the alert thresholds.

Note: the company is TikTok (a consumer app / content platform); treat this as a generic flash-sale / limited-inventory design problem, not a specific TikTok product.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More TikTok•More Software Engineer•TikTok Software Engineer•TikTok System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.