This solution helps buffer incoming user requests to your website during large bursts of traffic. It creates a cloud infrastructure designed to temporarily offload incoming traffic to your website, and it provides options to customize and integrate a virtual waiting room. The waiting room acts as a holding area for visitors to your website and allows traffic to pass through when there is enough capacity.
Examples of large-scale events that could produce a surge in website traffic include:
- Start of sale for concert or sporting event tickets
- Fire sale or other large retail sale, such as Black Friday
- New product launch with broad marketing announcements
- Exam access and class attendance for online testing and lessons
- Release of medical appointment slots
- Launch of a new direct-to-customer service that requires account creation and payments
Users are assigned a queue number when they enter the waiting room. They maintain their position in the queue and only leave the waiting room to enter the target site when it’s their turn.
The solution can control traffic for large-scale events. Traffic spikes won’t overwhelm your systems; keeping your website up and running for your customers.
The solution generates signed, time-limited JSON web tokens (JWTs), which allow the downstream system's APIs to validate users have successfully gone through the waiting room before processing any requests.
The solution’s OpenID adapter provides a set of OIDC-compatible APIs that can be used with existing web hosting software that support OIDC identity providers.
The solution provides a sample waiting room website to demonstrate a minimal end-to-end waiting room solution for customization.
The diagram below presents the architecture you can automatically deploy using the solution's implementation guide and accompanying AWS CloudFormation templates.
The AWS CloudFormation template deploys an Amazon CloudFront distribution to deliver public API calls for the client.
Amazon API Gateway public API resources to process queue requests from the virtual waiting room, track the queue position, and support validation of tokens that allow access to the target website.
An Amazon Simple Queue Service (Amazon SQS) queue to regulate traffic to the AWS Lambda function that processes the queue messages. Instead of invoking the Lambda function for each request, the SQS queue batches the incoming bursts of requests.
API Gateway private API resources to support administrative functions.
Lambda functions to validate and process public and private API requests, and return the appropriate responses.
Amazon Virtual Private Cloud (VPC) to host the Lambda functions that interact directly with the Amazon ElastiCache for Redis cluster. VPC endpoints allow Lambda functions in the VPC to communicate with services within the solution.
An Amazon CloudWatch rule to invoke a Lambda function that works with a custom Amazon EventBridge bus to periodically broadcast status updates.
Step 10 (Optional)
Authorizer component consisting of an AWS Identity and Access Management (IAM) role and a Lambda function to validate signatures for your API calls. The only requirement for the authorizer to protect your API is to use API Gateway.
Step 11 (Optional)
Amazon Simple Notification Service (Amazon SNS), CloudWatch, and Lambda functions to support two inlet strategies.
Step 12 (Optional)
OpenID adaptor component with API Gateway and Lambda functions to allow an OpenID provider to authenticate users to your website. CloudFront distribution with an Amazon Simple Storage Service (Amazon S3) bucket for the waiting room page for this component.
Step 13 (Optional)
A CloudFront distribution with Amazon S3 origin bucket for the optional sample waiting room web application.