Question #1535
A company launches a mobile app that provides real-time stock market updates to users. The app's backend must handle unpredictable traffic spikes during peak market hours while maintaining consistent response times. The company wants to minimize operational complexity while ensuring low latency. Which solution BEST meets these requirements?
Use an Application Load Balancer with Amazon Elastic Container Service (Amazon ECS) and Fargate deployment.
Use Amazon API Gateway and AWS Lambda functions with provisioned concurrency.
Use an Application Load Balancer with an Amazon Elastic Kubernetes Service (Amazon EKS) cluster and node auto-scaling.
Use Amazon API Gateway and AWS Lambda functions with reserved concurrency.
Explanation
Answer B is correct because:
- AWS Lambda with provisioned concurrency pre-initializes function instances, eliminating cold starts and ensuring consistent response times during unpredictable traffic spikes.
- Amazon API Gateway automatically scales to handle traffic spikes without operational overhead.
- Minimal operational complexity: Both services are serverless, requiring no infrastructure management.
Other options are incorrect because:
- A & C: ECS/Fargate and EKS require managing containers/nodes, adding operational complexity. Scaling may also be slower than serverless.
- D: Reserved concurrency limits Lambda's maximum concurrency but does not address cold starts, leading to latency during sudden traffic spikes.
Key points:
1. Serverless services (Lambda + API Gateway) reduce operational effort.
2. Provisioned concurrency ensures low latency by pre-warming Lambda functions.
3. Unpredictable traffic demands auto-scaling without manual intervention.
Answer
The correct answer is: B