Waiting Room
Queue management for high-traffic events.
Overview
The Waiting Room feature manages traffic during high-demand periods like flash sales, ticket releases, or product launches. When your site reaches capacity, visitors are placed in a virtual queue and admitted in order.
How It Works
- Visitor arrives at your site
- Check capacity - Are there available slots?
- If available: Visitor enters immediately with a session cookie
- If full: Visitor is placed in queue with a position
- Queue page: Shows position and estimated wait time
- Admission: When slots open, queued visitors are admitted in order
- Session active: Visitor can browse until session expires or they leave
Enabling Waiting Room
From Dashboard
- Go to your zone settings
- Click "Waiting Room" tab
- Enable "Waiting Room"
- Configure settings
- Save changes
Key Settings
| Setting |
Default |
Description |
| Max Active Users |
200 |
Maximum concurrent active sessions |
| Session Duration |
300s |
How long an active session lasts |
| Queue Timeout |
900s |
How long a queue entry is valid |
| Inactivity Timeout |
90s |
Time without activity before slot is freed |
Configuration
Capacity Settings
Total Active Users:
Maximum visitors who can be on your site simultaneously.
Consider your origin server's capacity:
- Small server: 50-100 users
- Medium server: 200-500 users
- Large server: 1000+ users
Session Duration:
How long a visitor's session lasts once admitted.
- 5 minutes (300s): Short sessions, more turnover
- 15 minutes (900s): Standard browsing
- 30 minutes (1800s): Complex purchases
Queue Settings
Queue Timeout:
How long a queue position remains valid. Visitors who don't check back within this time lose their spot.
Inactivity Timeout:
How long an active session can be idle before the slot is freed for others. We detect activity through automatic heartbeats.
Bypass Rules
IP Bypass
Allow specific IPs to skip the queue:
192.168.1.100 # Office IP
10.0.0.0/24 # Internal network
Use for:
- Admin access
- Monitoring services
- VIP customers
Path Bypass
Allow certain paths to skip the queue:
/api/* # API endpoints
/webhooks/* # Webhook handlers
/health # Health checks
/_next/* # Static assets (Next.js)
Cookie Bypass
Allow visitors with specific cookies to skip:
vip_access # VIP cookie
admin_session # Admin cookie
Queue Page Customization
Branding
- Title: Custom heading (e.g., "Almost there!")
- Message: Custom message explaining the wait
- Logo URL: Your logo image URL
Default Queue Page
Shows:
- Queue position
- Estimated wait time
- Auto-refresh countdown
- Animated loading indicator
How Sessions Work
Session Token
Visitors receive a signed cookie (wr_{zone_uuid}) containing:
- Session ID
- Timestamp
- Cryptographic signature
This prevents queue jumping or token forgery.
Heartbeat
Active visitors send automatic heartbeats every 30 seconds via JavaScript. This:
- Confirms the visitor is still on the site
- Keeps their session active
- Detects when visitors leave
Departure Detection
When a visitor closes the tab, we detect it via:
sendBeacon API on page unload
- Missing heartbeats after inactivity timeout
Departed visitors free their slot for queued users.
Preparing for High-Traffic Events
Before the Event
- Estimate traffic: How many visitors do you expect?
- Set capacity: Configure max active users below your server limit
- Test the flow: Verify queue page and admission work
- Pre-cache pages: Request key pages to warm the cache
- Notify users: Tell customers about the queue system
During the Event
- Monitor queue length: Watch for excessive wait times
- Adjust capacity: Increase if your server can handle more
- Watch errors: Check for origin errors or timeouts
After the Event
- Disable waiting room if not needed
- Review metrics: Check queue lengths and wait times
- Optimize: Adjust settings for next time
Monitoring
Dashboard Metrics
View real-time statistics:
- Current active sessions
- Current queue length
- Average wait time
- Sessions admitted per minute
API Access
# Get waiting room status
curl "https://nordiccdn.com/api/v1/zones/{uuid}/waiting-room/stats" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response:
{
"active_sessions": 187,
"max_sessions": 200,
"queue_length": 342,
"avg_wait_seconds": 180
}
Best Practices
1. Set Realistic Capacity
Don't set max users higher than your origin can handle. The goal is to protect your server, not maximize throughput.
2. Use Short Sessions
Shorter sessions (5-10 minutes) allow more visitors through during peak times. Combine with good UX to help visitors complete tasks quickly.
3. Pre-Cache Important Pages
Before high-traffic events, warm your cache:
# Pre-cache product pages
curl https://yoursite.com/product/sale-item
curl https://yoursite.com/checkout
4. Bypass Static Assets
Always bypass waiting room for:
- CSS and JavaScript files
- Images
- Fonts
- API endpoints (if they have their own rate limiting)
5. Test Before Events
Run a load test with waiting room enabled to verify:
- Queue page displays correctly
- Admission works properly
- Session tracking functions
Troubleshooting
Visitors Not Being Queued
- Verify waiting room is enabled
- Check if visitor IP is in bypass list
- Confirm path isn't in bypass list
- Check that visitor doesn't have bypass cookie
Queue Position Not Updating
- Ensure JavaScript is enabled
- Check for browser extensions blocking requests
- Verify network connectivity
- Try refreshing the page
Sessions Expiring Too Fast
- Check inactivity timeout setting
- Verify heartbeat script is loading
- Check for JavaScript errors in console
Origin Overloaded Despite Waiting Room
- Reduce max active users
- Shorten session duration
- Check bypass rules aren't too permissive
- Verify all traffic goes through CDN