System design · Cases: ten designs, worked end to end

Design a ticket booking system

Selling seats is a small inventory problem wrapped in a very large traffic problem, and the two need opposite designs. This works it in interview order, with a conditional seat hold that expires on its own, a payment step that cannot double-sell, and an admission queue paced by the seats that are actually left.

28 min read Full lesson in the app Patterns: conditional-hold, lazy-expiry, admission-queue

What you'll be able to do

Before this: contention-and-locking, scaling-reads

Log in to read the rest of this lesson

Selling seats is a small inventory problem wrapped in a very large traffic problem, and the two need opposite designs. This works it in interview order, with a conditional seat hold that expires on its own, a payment step that cannot double-sell, and an admission queue paced by the seats that are actually left. This walkthrough runs about 28 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.

Log in to continue

The first module of every track is free to read on the web: see what's open in System design.