Overview
The Virtual Waiting Room on AWS 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
Benefits
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 OpenID Connect (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.
Technical details
You can automatically deploy this architecture using the implementation guide and the accompanying AWS CloudFormation template
Step 1
The AWS CloudFormation template deploys an Amazon CloudFront distribution to deliver public API calls for the client.
Step 2
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.
Step 3
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 Amazon SQS queue batches the incoming bursts of requests.
Step 4
API Gateway private API resources to support administrative functions.
Step 5
Lambda functions to validate and process public and private API requests, and return the appropriate responses.
Step 6
Amazon Virtual Private Cloud (Amazon 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.
Step 7
An Amazon CloudWatch rule to invoke a Lambda function that works with a custom Amazon EventBridge bus to periodically broadcast status updates.
Step 8
Amazon DynamoDB tables to store token, queue position, and serving counter data.
Step 9
AWS Secrets Manager to store keys for token operations and other sensitive data.
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 S3 origin bucket for the optional sample waiting room web application.
- Publish Date