Queue Session Expiry: Keeping a Place Alive When a Phone Sleeps
Why sessions expire at all
A queue place is a claim on scarce inventory, and claims cannot live forever. Expiry clears abandoned sessions so places recycle to people still present, stops place hoarding by scripts that join early and idle, and bounds the total load the admission system must track. A queue with no expiry fills with ghosts within the hour and admits the dead while the living wait. The rule is not the problem. The calibration is.
Expiry should track presence, not wall clock time alone. A session that checks in, through a lightweight heartbeat the client sends while the page or app is alive, has evidence of a present human. A session silent for the full grace window, heartbeat and all, is a reasonable expiry. The design question is what counts as alive when the device itself is conspiring to look dead.
Design for the device people actually have
Mobile browsers throttle or suspend background tabs aggressively to save battery. A queue page left open while the fan makes tea can stop sending heartbeats through no act of abandonment, and return to find itself expired and at the back of a new queue. Well built queues account for this: the heartbeat resumes with a catch up signal, the server allows a reconnection window measured in minutes, and the place is held through brief silence rather than executed at the first missed beat.
Network switches are the second killer. Moving between wifi and mobile data can change the visible network address, and a session bound rigidly to one address reads that as a new, suspicious session. Bind the session to a token the client holds, treat the network as a soft signal, and a fan can walk from their kitchen to their train without the queue deciding they cloned themselves.
The reconnection window is the fairness compromise
Critics will say a grace window lets bots park places. It can, if the window is long and the checks are absent. A short window, a few minutes, combined with the same device and account signals the session started with, buys almost no advantage for automation, which operates at machine patience anyway, and saves a large share of genuine human accidents. Fairness systems should be judged on both error rates: bots admitted and humans evicted. A design that brags about the first while hiding the second is not strict. It is lopsided.
Publish the rule on the waiting page in one sentence: if you lose connection, return within a few minutes on the same device and your place is held. Fans who know the rule stop panic refreshing, stop opening duplicate sessions on a second device, which itself trips fraud signals, and wait the way the system hoped they would.
Measure evictions like you measure admissions
Log every expiry with its cause as best the system can tell: heartbeat timeout, network change, explicit exit, admission pass unused. Review the eviction report after major sales with the same attention as the sellout time. If heartbeat timeouts on mobile browsers are the largest eviction cause, the queue's biggest fairness problem is not bots at all. It is a timer, and timers can be fixed.
Set the expiry values from that data, per event size where behaviour differs, and retest them when the client app or page changes. Session rules are load bearing and invisible, the combination that guarantees they rot quietly unless someone owns the report.
Keep reading
Related guides on this site: Queue Re-Entry After a Disconnect: Fair Rules for Dropped Connections Release Waves Explained: Why Queues Let People In in Batches https://queuekeep.com/blog/index.md.
Frequently asked questions
Why did I lose my queue place when my phone slept?
Many queues expire sessions that stop sending presence signals, and a sleeping or backgrounded phone can stop sending them. Better designed queues hold a place through a short reconnection window on the same device, but older or stricter systems expire at the first long silence.
What is a queue heartbeat?
A small periodic signal from the queue page or app to the server saying the session is still open and attended. Expiry rules usually key off missed heartbeats, which is why anything that suspends the page, battery saving, tab switching, can look like abandonment.
Does a reconnection grace window help bots?
A short window of a few minutes, tied to the same device and account, offers automation almost nothing, because bots do not need to reconnect. It mainly rescues genuine users from ordinary phone behaviour, which is the right trade.
How can I protect my place in a queue?
Keep the queue page or app in the foreground where you can, stay on one device and one network if possible, and if you do lose connection, return quickly on the same device rather than starting a second session elsewhere.