Soru

Zorluk: Çok zorPerformance and Scalability Optimization

A global e-commerce platform is launching a high-profile, limited-edition flash sale. The platform's baseline database workload is 5,0005,000 write requests per second (RPS). However, historical data shows that during a flash sale, the traffic spikes instantaneously to 250,000250,000 write RPS within 1010 seconds. Each write request represents a transactional inventory deduction that must be atomic, isolated, and completed with sub-10 ms10\text{ ms} 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?

  1. 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 250,000250,000, using DynamoDB Transactions for the atomic updates.Cevap
  2. B
    Deploy 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.
  3. C
    Deploy 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.
  4. D
    Deploy 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 250,000250,000, and rely on the default unreserved regional Lambda concurrency pool to scale the compute layer.

Cevap

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 250,000250,000 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.

Adım Adım Çözüm

1
Analyze the load balancer performance characteristics under flash-sale conditions.
Identify that a Network Load Balancer (NLB) is required to handle the sudden, massive spike from 5,0005,000 to 250,000250,000 RPS without pre-warming, whereas an Application Load Balancer (ALB) would fail due to gradual scaling limitations.
Choosing the right entry point prevents request drops at the edge.
2
Evaluate the database scaling constraints for write-intensive transactional operations.
Determine that Amazon DynamoDB with pre-allocated Provisioned Capacity Mode is necessary to handle the instantaneous 50×50\times write surge. Reject On-Demand mode due to the 2×2\times peak scaling limit, and reject Aurora MySQL Reader Auto Scaling since reader replicas cannot process write transactions.
Ensures the database layer does not throttle the incoming transactions.
3
Select and configure the compute layer to handle the load securely and reliably.
Choose ECS on Fargate pre-scaled to the peak demand, avoiding cold starts or regional concurrency exhaustion associated with unreserved AWS Lambda functions.
Guarantees that compute resources are immediately available to process the incoming requests.

Anahtar Kavram

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).
Bu soruyu puanla