Selling tickets that sell out in minutes: keep the site up and the line fair
· Hibira
For ticket sellers and event organisers: why the site falls over at the on-sale minute, how a hosted waiting room keeps it up and the line fair with no queue code, and, if you build it yourself, how to push queue progress, seats and sold-out notices with realtime channels.

Tickets go on sale at 8 p.m. sharp. At 7:59, tens of thousands of people are staring at the same button, counting down and hitting refresh. At 8:00:01 the button lights up and everyone clicks at once. By 8:00:30 only a handful of seats are left for the popular dates. At 8:02: "Sold out."
Any team that has run a ticket sale, a limited pre-order or a flash sale knows those two minutes. A whole day's traffic arrives in the first minute of the sale. When SeatGeek's engineers presented their virtual waiting room at QCon, they put it plainly: on-sale traffic can be orders of magnitude above normal, and most of the time autoscaling simply can't scale fast enough.
This post is for ticket sellers, event organisers and the developers behind their on-sales. There are two ways to get through those two minutes: put a hosted waiting room in front of the sale page, which takes an afternoon and no queue code, or build the queue, the seat map and the notices yourself on realtime channels. We start with the first and then cover the second in detail, including what must stay on your backend either way.
The fastest fix: a hosted waiting room
The Hibira waiting room puts a fair line in front of your sale page. When the sale opens, visitors land on a hosted page that shows their place in line and an estimated wait, updated live, and they are let in at the rate your checkout can take. Your site only checks the signed pass they come back with, so it never sees the rush. From the portal you can pause the line, let more people in, post an announcement such as "Zone A is sold out", or mark the sale as sold out for everyone at once.


The free plan includes one room, and a single event can be covered with a one-off purchase. If you need your own seat map, or want the line inside your own app, the rest of this post shows how to build it.
What happens the moment tickets go on sale
A ticket rush is hard not because it has many features, but because everyone does the same thing in the same second.
The spike has three traits:
- Its timing is completely predictable. You know when it arrives and that it lasts only minutes.
- Demand far exceeds supply. Fifty thousand people chase five thousand tickets. Nine in ten will leave empty-handed, and all of them want to know the moment it happens.
- Everyone is watching the same state. How many seats are left, whose turn it is, whether it has sold out.
That third point is exactly what realtime push is good at.
Why polling can't keep up
About the comparison: The 25,000-to-81 request figures are an illustrative estimate of status-polling versus status-publication traffic, not total backend load. Purchases, admission checks, authentication, payment and retries still reach your backend. A single publication to 50,000 subscribers also entails up to 50,000 outbound deliveries and must fit your service plan.
The obvious approach is to have the page ask the server every few seconds: "Where am I in line?" "Are there seats left in this section?" And impatient users hit refresh on top of that.
Do the math: 50,000 people on the waiting page, each polling every two seconds, means your backend answers 25,000 requests a second. Most of the time the answer is "same as two seconds ago." Those requests compete with the real purchase requests for the same resources, and in the one minute you need your database most, it is busy answering "nothing changed."
Polling
Push
trigger() a secondWith push, the direction flips. Fifty thousand people no longer ask you. You say it once when the state changes, and the realtime service delivers that one message over fifty thousand connections. Your backend handles only the requests that actually change inventory.
First, split the system in two
Before designing channels, one thing needs to be clear: realtime push is responsible for "letting everyone see," not for "deciding who gets a ticket."
A ticket rush system splits into two halves:
- The half that decides outcomes: decrementing inventory, holding seats, creating orders, payment, admitting people from the queue, stopping bots. All of this lives on your backend, with your database making the final call.
- The half that shows state: your place in line, seats left in this section, it's your turn, how long your hold has left, sold out. This is what push is for.
trigger()The benefit of this split: even if a push message is lost, nobody buys one ticket too many or too few. A missed push means the screen updates a little later. A wrong database is the real incident.
The waiting room: one broadcast, everyone works out their own position
Important FIFO assumption: Subtracting admittedUpTo from a ticket number is accurate only for a contiguous, monotonically numbered first-in-first-out queue where everyone before that position counts. Priority groups, randomized admission, cancellations and skipped or expired tickets break that assumption. For those queues, calculate the actual position on the backend; keep the admission token as the only authority to purchase.
The most common waiting-room feature is "12,408 people ahead of you." The intuitive way is to push each person their own position, but fifty thousand people means fifty thousand messages, and every admitted batch changes everyone's position again.
The better way turns it around. When someone enters the waiting room, your backend hands them a queue number (say #53,120). From then on you broadcast a single number: "admitted up to #40,712." Each browser subtracts that from its own number and knows how many people are ahead. One message, and fifty thousand people each work out their own position.
This uses a cache channel (prefix cache-). A cache channel remembers its last event, so people who arrive late or reconnect get the current admission number the moment they subscribe, without calling your API.
// Your backend: broadcast progress once per admitted batch
async function admitNextBatch(eventId, size) {
const admitted = await queue.admit(eventId, size); // admission happens in your database
await pusher.trigger(`cache-onsale-${eventId}`, 'queue', {
admitted: admitted.upTo,
status: admitted.soldOut ? 'sold_out' : 'open',
});
}// Browser: work out your position from your own queue number
const onsale = pusher.subscribe(`cache-onsale-${eventId}`);
onsale.bind('queue', ({ admitted, status }) => {
if (status === 'sold_out') return showSoldOut();
showAhead(Math.max(0, myTicket.number - admitted));
});The queue number must be signed by the backend, and admission must be decided by the backend too. The broadcast number only tells users how things are moving. Whether someone can actually enter the purchase page depends on an access token your backend issues, not on what the browser computed.
It's your turn: a notification for one person
When admission reaches a number, the person holding it needs to know "you can go in now." That message belongs to them alone, so it doesn't go on a public channel.
The Pusher protocol offers two ways: with user authentication, your backend calls sendToUser() to reach all of that user's connections; or each user subscribes to a private channel only they can be authorized for, such as private-user-<id>.
// Each admitted person gets their access token; the backend issues it and the purchase API checks it again
for (const visitor of admitted.visitors) {
await pusher.sendToUser(visitor.userId, 'admitted', {
accessToken: visitor.accessToken,
expiresAt: visitor.expiresAt,
});
}The same private path suits other one-person notices: "Your seat hold has 2 minutes left," "Payment complete," "Your hold expired and the seats were released." The countdown follows the expiry time your backend recorded; the push is only a reminder.
The seat map: one channel per section, full state each time
The pain of seat selection: you click the seat you wanted and only then find out someone else took it. A seat map that updates live greys out taken seats immediately, so users stop running into walls.
Two design points:
- One channel per section. For example
cache-seats-2412-a3. Users subscribe only to the section they're looking at, so fifty thousand people don't all receive every section's changes. - Send the whole section's state, not diffs. With 500 seats and one bit per seat, a whole section is 63 bytes, under 100 characters in base64. Send the full section every time, and anyone who missed one message is correct again with the next. Combined with a cache channel, a newcomer gets the latest full section the moment they subscribe.
trigger()In the first second of a sale, seats in one section might be taken every millisecond. Publish on every change and the message volume explodes along with the orders. Merge into one full-section update every 0.5 seconds, and users barely notice the difference while the publish count stays fixed.
// Every 0.5 s, send the full state of each section that changed
setInterval(async () => {
for (const section of seats.takeDirtySections(eventId)) {
await pusher.trigger(`cache-seats-${eventId}-${section.id}`, 'seats', {
bitmap: section.availabilityBitmap(), // base64, one bit per seat
version: section.version,
});
}
}, 500);Sold out: the last broadcast
The moment a sale sells out, the people who most need to know are the ones still in line. Rather than letting them keep waiting, or showing an error once they reach the purchase page, broadcast sold_out on the same waiting-room channel. Because it's a cache channel, anyone who opens the page afterwards sees "Sold out" straight away instead of joining the line first.
If someone later fails to pay in time and their seats are released, release them on the backend first, then broadcast open again to let the next people in.
Connect before the sale, not at the sale
Push removes the request spike, but the connection spike is still there. If fifty thousand people all open the page at exactly 8:00 and all open WebSocket connections at once, the pressure has simply moved from your API to connections.
SeatGeek sends people to the waiting page thirty minutes before the sale. We recommend the same: let users enter the waiting page and connect before the sale starts. At the moment of the on-sale, one broadcast is all it takes for everyone to receive "go" together. The connections are already there; what really happens at that instant is a single fan-out.
30 minutes before
The second the sale opens
trigger()To show "38,214 people waiting," turn on subscription counts (pusher:subscription_count) for the waiting-room channel, or use a large presence channel (presence-large-, up to 100,000 members). A regular presence channel sends the full member list to everyone and holds up to 100 members, so it fits a small group picking seats together, not a whole waiting room. Note that this number is "people viewing the page," not people in the queue; the queue length still comes from your backend.

Size your plan for the peak
One publish to fifty thousand people counts as one message on Hibira, and on Hobby and above the deliveries to each subscriber aren't counted toward your plan. A waiting room that broadcasts once a second for thirty minutes uses 1,800 messages, a small fraction of a daily allowance measured in millions.
What you do have to plan for is the peak. Every open tab is a connection, and fifty thousand people online at once needs a plan with room for fifty thousand connections; Scale has 72,000. Size for the minute the sale opens, not for an average day.
Broadcasting less often still helps. A queue position that updates every two or three seconds feels just as alive, costs phones less battery and leaves more headroom on congested networks. The seat map works the same way: one channel per section, so each person only receives the section they're viewing.
What must stay on your backend
Realtime push makes a ticket rush feel smooth, but no push service should, or can, do these for you:
- Inventory locking. "Is this seat still free?" and "give this seat to this person" must be one atomic operation. The simplest reliable way is a conditional update: it succeeds only if the seat isn't held, or its hold has expired; if it fails, someone else got there first. Don't read and then write; two requests will both see "still free."
- Holds and releases. Seat holds need an expiry time. When they expire, the backend releases them and broadcasts the seat state again. The countdown on the client is display only.
- Idempotency. On a shaky network users click "Buy" several times, and phones may retry requests on their own. Send an idempotency key when creating orders and taking payment, so one key produces exactly one order.
- Queue token checks. Queue numbers and access tokens are issued by the backend and checked by the purchase API every time. Never let someone in because the browser says "it's my turn."
- Bot defense. CAPTCHAs, per-account and per-device rate limits, per-person purchase limits and ID checks all belong on your backend and your protection layer. If you worry that people who arrive early win on speed, you can do what Queue-it does: randomize everyone already waiting at the moment the sale opens, so network speed and fast machines no longer decide the order.
- Never let clients publish state. Inventory, queue progress and sold-out status are published only by your backend. Don't use client events on these channels.
In one sentence: what you push is always "a result the backend has already decided," never "backend, please do this."
Disconnects and missed messages
The network is at its worst during an on-sale, and some people will drop. pusher-js reconnects automatically following the protocol's rules and resubscribes to its channels afterwards. Because the waiting room and seat map are cache channels carrying full state, the moment of resubscribing brings the latest progress and seats, with no need to replay the messages in between.
One-person notices (like "it's your turn") are different: if one is missed, it's missed. So when a reconnect succeeds, the browser should call your API once to confirm its current state: still waiting, admitted, or holding seats. Push lets most people know first; the API makes sure everyone ends up right.
The debug console shows every connection, every subscription and every published event, which is handy for load tests before the sale:

Conclusion
The hardest part of a ticket rush is allocating limited inventory fairly and correctly within a minute, and that half must stay firmly on your backend: atomic inventory locks, holds and releases, idempotent orders, backend-issued tokens and bot defense.
The other half is letting fifty thousand people know what's happening at the same time. That half doesn't need fifty thousand polling requests, only one publish when the state changes: the waiting room broadcasts admission progress on a cache channel, admitted people are notified one by one on a private path, the seat map sends full-section state on one channel per section, and one broadcast tells everyone it has sold out.
Hibira speaks the Pusher protocol, so pusher-js, Laravel Echo and the server libraries for every language work as they are. If your next sale is close, start with the waiting room: it needs no queue code, and the free plan includes one room. For auctions, flash sales and other "many people watching the same thing" cases, see the live audiences use case. Sign up, no credit card needed, and run the whole flow end to end before the sale.