When your origin server receives a high volume of requests, a waiting room helps manage the traffic. This feature prevents surges from causing origin server downtime by limiting concurrent users and queuing the excess.
Benefits
A waiting room provides flexible traffic control for your origin server in the following ways:
Flexible control over origin traffic: You can set the maximum number of active users and new users per minute based on your origin server's capacity. This ensures your service stays online.
Session persistence: The waiting room tracks the status of each visitor. This prevents users from having to re-queue if they navigate away from your site for a short time.
Multiple queuing methods: You can manage the queue using various methods, such as first in, first out (FIFO) and random.
Bypass rules: You can create rules to specify which requests can bypass the queue and access the origin server directly.
What is a waiting room
When your website launches activities such as flash sales or ticket sales, many users may access it in a short period. These high-concurrency visits can cause the origin server to go down, which significantly impacts your service availability. To address this issue, ESA provides a waiting room service. By creating a waiting room, you can limit the number of users who can access the origin server at the same time and direct excess users to the waiting room. The queued users then wait for their turn to access the origin server.
You can configure a cookie to track each user's place in the queue. This cookie acts like a ticket, recording each user's "ticket number". The waiting room also provides queue information to users, much like a departure board in a station, showing them their current position in the queue.
How it works
When a client sends a request to an ESA POP, the following process occurs:
If there is a cache hit on a POP, the POP serves the cached content directly to the client.
If a request misses the cache on a POP, the request is sent back to the origin server for content. The POP then matches the request URL against the configured waiting room rules.
If the request does not match a waiting room rule, it is sent directly to the origin server.
If the request matches a waiting room rule, ESA checks if the limits for total active users and new users per minute have been reached.
If the limits are not reached, the request is sent to the origin server.
If a limit is reached, the request is placed in the waiting room queue. Requests in the queue are sent to the origin server based on the queuing algorithm.
Availability
Waiting room is exclusive to the Premium and Enterprise plans. Some features require enabling Waiting Room Pro on the Enterprise plan. To enable them, contact us.
Feature | Premium | Enterprise |
Basic waiting room features | Supported | Supported |
Number of waiting rooms | 1 | 1 by default. Up to 10 are supported after you enable the Waiting Room Pro version. |
Multiple hostnames and paths | Not supported | 1 by default. Up to 50 are supported after you enable the Waiting Room Pro version. |
Custom templates | Not supported | Supported after you enable the Waiting Room Pro version. |
Disable session renewal | Not supported | Supported after you enable the Waiting Room Pro version. |
JSON-friendly response | Not supported | Supported after you enable the Waiting Room Pro version. |
Custom queue status code | Supported | Supported |
Queuing method | Only FIFO is supported | FIFO is supported by default. All queuing methods are supported after you enable the Waiting Room Pro version. |
Waiting room rules | Not supported | Supported after you enable the Waiting Room Pro version. Up to 5 rules are supported. |
Waiting room events | Not supported | Supported after you enable the Waiting Room Pro version. Up to 5 events are supported. |
SEO crawler bypass | Supported | Supported |