Flow: Waiting Queue (Mobile App Only)¶
Actor¶
Fan trying to purchase tickets for a high-demand match.
Context¶
For high-demand matches, HNS expects significant load:
- Expected Users: 100,000+ fans attempting to purchase
- Available Tickets: ~20,000 (after quota allocations)
- Goal: Control access to seat selection & checkout to maintain fairness and system stability
Preconditions¶
- Match is on sale (sales activate at scheduled time, e.g., 12:00)
- User is logged into the HNS mobile app
- Waiting queue microservice is active (auto-enabled based on traffic demand, not a per-match setting)
Technical Notes¶
Match Activation Timing:
- Sales open at a predefined time (e.g., 12:00) configured by admin
- Mobile app activates "Buy Tickets" / "Join Queue" button at the scheduled time
- Server-side validation prevents early access (to prevent time spoofing on client)
- App may use combination of:
- Client-side timer that activates UI at scheduled time
- Server validation on queue join request to verify sale is active
- Push notification at sale start time: "Ticket sales for [Match] are now open!"
Potential Bottleneck - Login/Registration:
- 100,000+ users may attempt to login/register immediately before ticket release
- Consider implementing queue for authentication endpoints during high-demand periods
- Pre-registration campaigns can reduce login surge at sale time
Flow Steps¶
-
Join Queue
- User opens match page in the mobile app
- App shows status: "High Demand – Join Queue"
- User taps "Join Waiting Queue"
- Backend assigns:
- Queue position
- Estimated wait time
- Total queue size
- A persistent queue banner appears inside the app
-
Queue Position Display
- User sees their position: "You are #2,547 in queue"
- Position updates:
- Local countdown decrements position every second (smoother UX)
- Server sync every 60 seconds corrects the actual position
- This provides responsive feel while maintaining accuracy
- Displays:
- Estimated wait time
- Total queue members
- Progress indicator
- User can leave the match screen — the queue remains active
-
Continue Shopping
- User can browse the HNS shop while waiting
- Queue banner remains visible globally:
- Match pages
- Merchandise shop
- Home screen
- The queue maintains:
- Active WebSocket/Firebase connection
- OR background polling fallback
-
Queue Advancement
- Backend advances queue when:
- Users complete purchases
- Purchase time expires (20 minutes from queue entry)
- Inventory is released
- Admins add more quota
- Backend safely "drip-feeds" users to avoid:
- Seat allocation spikes
- Payment load spikes
- Backend advances queue when:
-
Progressive Notifications
- Push notifications for:
- Position change: "You're now #500 in queue"
- Near position: "You're almost at the front (#50). Get ready!"
- Your turn: "It's your turn! Buy tickets for Croatia vs Portugal"
- User has 20 minutes total from entering the purchase flow to complete the entire transaction (zone selection, checkout, payment)
- Push notifications for:
-
Purchase Window Opens
- Tap on push notification or return to the app
- Deep-link directly to zone selection
- User sees Standard Ticket Purchase
-
Complete Purchase
- User completes checkout
- Next queue user is notified
- If the user fails to complete within 20 minutes:
- Seats return to inventory
- Next queue user is notified
- User loses queue position and must rejoin at the end of the queue
Alternative Flows¶
A1: User Misses Purchase Window
- User loses their queue position
- Must rejoin at the end of the queue (treated as new user)
- Notification: "Your purchase window has expired. Please rejoin the queue to try again."
A2: User Leaves Queue
- User clicks "Leave Queue"
- Confirmation prompt displayed
- Position is lost permanently
- Rejoining sends them to back of queue
A3: All Tickets Sold
- Backend closes queue
- Push notification: "Match sold out."
- Queue disbanded automatically
A4: Connection Lost
- Queue position persists for 30 minutes
- On reconnect:
- App restores position
- Message: "Welcome back! You're still #127 in queue"
A5: Multiple Devices
- Same user ID = same queue position
- Device switch transfers the queue session
- Secondary device shows: "Queue transferred to another device"
Last Updated: January 2026