Queue load test — 300,000 visitors waiting on a single machine
How we load-tested our queue before a big drop, why the first version hit a wall at about 51,000 people and what we changed to hold 300,000.
Before a big drop, assuming the queue will hold isn't enough. You have to check. In November 2026 we load-tested our queue ahead of a launch where we expected tens of thousands of people in the first minutes. Here's what we found — including what didn't work the first time.
How the test worked
We generated traffic from a separate machine, straight to the queue server, bypassing Cloudflare — we wanted to measure the server itself, not caching along the way. Every virtual user behaved like a real customer in the waiting room: it got a ticket, then periodically asked for its position.
The first version: a wall at 51,000
The first version of the queue stalled at around 51,000 people waiting. The cause was simple: for every position request the server counted in the database how many people were ahead of that customer. With a short queue that's free. With a long one, every request means counting tens of thousands of tickets — and the more people wait, the more requests there are. The cost grows roughly with the square of the queue length.
What we changed
Order kept in memory instead of counted in the database
Ticket order now lives in Redis, a fast in-memory database. A customer's position is read instantly, without recounting the whole queue.
Fewer position checks for people at the back
Someone 40,000th in line doesn't need to check their position every few seconds — it changes slowly anyway. People near the front ask more often, people far back less often. The largest group, the back of the queue, now generates the least traffic.
Server configuration for load
The default server configuration allowed more PHP processes than the database accepted connections. Under load that ended in "Too many connections" errors. Process and connection limits have to be set together, for the specific machine.
Result: 300,000 people waiting
After the changes, a machine with 16 virtual CPUs and 32 GB of memory held 300,000 people waiting at once at around 27% CPU with zero errors. The smallest machine we tested (2 vCPUs, 0.5 GB of memory) handled about 15,000–17,000 people — enough for a small drop, not for a big launch.
Takeaways
- Test a scenario close to the real one, not a single request.
- Look for operations whose cost grows with the queue — they're what kills performance at scale.
- Size the server for each drop. A large machine costs around ten dollars a day, so there's no point skimping on launch day — or paying for it the rest of the year.
The queue is only half of the story. The other half is the store behind it — which is why we always set the admission limit from a test of the store itself.