An ordinary peak builds gradually: more visits in the evening, at weekends, before holidays. Ticket drops and launches are different. Everyone knows the exact minute it starts, so traffic doesn't grow – it hits. In the same second, thousands of people want the same thing: the few seats there are.
You can't “scale up” a system like that on the day. It's built as a set of decisions, each of which takes load off the next layer.
1. A waiting room in front of everything
The most important decision: don't let everyone in at once. A virtual waiting room (a queue) is a static page on the CDN that can hold practically unlimited visitors. Buyers are let in only as fast as the system behind can serve them, in order of arrival, each with their own token. People would rather wait in a queue that moves than stare at an error page.
2. Everything that can be static is static
The event page, description, prices, the seating-plan image – they're the same for everyone and come from the CDN, warmed up before the start. Only the requests that actually change state reach the servers: reservation and payment. We wrote more about what can be static here.
3. Every seat is its own record – in a distributed Redis
This is the heart of the problem. The classic approach keeps a single number in the database: “seats left: 2,000”. When thousands of requests try to decrement it at the same time, they all fight for the same lock – the database doesn't fail because it's weak, but because everyone is waiting for everyone else.
It's better to flip the logic: don't store a number, store every seat. A 2,000-seat venue in memory is 2,000 small records – row, seat number, status (free, held, paid), who holds it and until when. Buyers no longer fight over one database row; each claim touches only its own seat.
In practice, for this kind of write load, the only layer that really holds up is Redis – and a distributed one:
- Atomic seat claims. “If the seat is free – write the buyer and the expiry” runs as one indivisible operation (e.g. a Lua script). Two buyers can never get the same seat, and no locks are needed.
- Sharding by section. Sections or time slots are spread across the nodes of the cluster, so the load is shared instead of hammering one machine.
- Replicas. Every node has a standby that takes over if the primary goes down.
- The same tool for the rest: waiting-room tokens, per-account rate limits, sessions – all in one place, in memory.
The number of seats left becomes just a derived value – a sum of statuses you can compute at any time. What matters isn't the total, it's that every single “cell” is filled correctly: which seat, whose it is, and whether it's paid.
It still holds that Redis is not the ledger. It holds the state of the sale and decides fast. The final, paid order is written to the database, which stays the source of truth – and seats are reconciled after the sale.
4. Reserve, don't sell
When a buyer picks a seat, it moves to “held” for a few minutes, with the buyer and an expiry. If they don't pay, the hold expires and the seat goes back to “free” – no manual clean-up, no “stuck” tickets. Once payment goes through, the status becomes “paid”.
5. Payments through a queue, protected from double clicks
The payment provider has its own limits and shouldn't be flooded. Orders go through a message queue and are processed at a steady pace. Every request carries a unique key (an idempotency key), so a double click or a retried request never charges a customer twice.
6. Bots and scalpers
On popular sales, a significant share of traffic isn't human. Per-account and per-address rate limits, a firewall in front of the site and a check at the waiting-room door keep seats for real buyers. We wrote about web application firewalls here.
7. Deliberately switching off the extras
Recommendations, advanced search, reviews – during the sale they can wait. Switches prepared in advance (feature flags) turn off secondary features and leave the resources for what matters: buying.
8. Decisions are made before the sale, not during it
The biggest difference between a sale that goes smoothly and one that falls over isn't technology – it's preparation. A load test with a realistic scenario, a plan for what happens if something fails, clarity about who decides, and monitoring that shows the state in real time. On the day, the team just follows the plan. That's why we also run load tests: the big day is just another day.








