A global e-commerce platform is launching a high-profile, limited-edition flash sale. The platform's baseline database workload is write requests per second (RPS). However, historical data shows that during a flash sale, the traffic spikes instantaneously to write RPS within seconds. Each write request represents a transactional inventory deduction that must be atomic, isolated, and completed with sub- latency. The architecture must guarantee that zero requests are dropped or throttled during this rapid transition. Which architecture represents the most performant, scalable, and operationally efficient solution according to AWS best practices?
- Deploy a Network Load Balancer (NLB) targeting an Amazon Elastic Container Service (Amazon ECS) service on AWS Fargate, pre-scaled to the expected peak task count. Store the inventory in an Amazon DynamoDB table configured in provisioned capacity mode with Write Capacity Units (WCUs) pre-allocated to , using DynamoDB Transactions for the atomic updates.Answer
- BDeploy an Application Load Balancer (ALB) targeting an Amazon ECS service on AWS Fargate with target tracking scaling enabled. Store the inventory in an Amazon DynamoDB table configured in On-Demand capacity mode, using DynamoDB Transactions for the atomic updates.
- CDeploy an Application Load Balancer (ALB) targeting an Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling group. Store the inventory in an Amazon Aurora MySQL database cluster, and configure Aurora Auto Scaling to dynamically provision reader replicas to distribute the write transaction load.
- DDeploy a Network Load Balancer (NLB) targeting an Application Load Balancer (ALB) that integrates with an AWS Lambda function. Store the inventory in an Amazon DynamoDB table configured in provisioned capacity mode with Write Capacity Units (WCUs) pre-allocated to , and rely on the default unreserved regional Lambda concurrency pool to scale the compute layer.
Answer
Deploying a Network Load Balancer targeting a pre-scaled Amazon ECS service on AWS Fargate, combined with an Amazon DynamoDB table using pre-allocated provisioned Write Capacity Units (WCUs), provides the necessary instantaneous scaling and performance.
The correct architecture uses a Network Load Balancer (NLB) because it is engineered to handle sudden spikes of millions of requests per second without needing to be pre-warmed. By pre-allocating DynamoDB Write Capacity Units (WCUs) to in provisioned capacity mode, the database immediately has the necessary write throughput available, preventing any write throttling. Finally, pre-scaling the Amazon ECS on AWS Fargate tasks ensures that the compute layer is ready to process the load immediately without relying on slow reactive scaling policies.
Step-by-Step Solution
Key Concept
Handling instantaneous, extreme traffic spikes requires pre-allocating capacity at both the database layer (DynamoDB Provisioned Capacity) and compute layer (pre-scaled ECS tasks) combined with a load balancer designed for rapid scaling (Network Load Balancer).