Design a high-concurrency ticketing system
Company: TikTok
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
Design a high-concurrency ticketing/flash-sale system for limited seats: Handle millions of concurrent purchase attempts, ensure strict inventory correctness with no oversell, provide fairness (e.g., FIFO queue or lottery), implement anti-bot protections, rate limiting, and queuing with backpressure, support short-term reservations with payment timeouts, ensure idempotent order creation and safe retries, shard hot items, and expose real-time availability. Describe APIs, data model, read/write paths, cache/DB choices, message queues, consistency model and reconciliation, failure handling, capacity planning, and load testing.
Quick Answer: This question evaluates a candidate's ability to design scalable, high-concurrency backend systems with strict inventory correctness, fairness, reservation/payment workflows, and operational concerns such as caching, message queues, consistency models, capacity planning, and load testing in the System Design domain.