SAA-C03 Question 468
Single answerA startup is running a web application that experiences unpredictable traffic spikes. The application consists of multiple microservices that need to scale independently. The team wants to optimize compute utilization while minimizing operational overhead and costs. Which approach should they take?
- A
Deploy the application on Amazon EC2 instances in an Auto Scaling group with pre-defined scaling policies.
- B
Package the microservices into containers and deploy them on Amazon ECS with AWS Fargate.
- C
Use AWS Lambda functions for each microservice and trigger them based on specific events.
- D
Use Amazon EC2 instances with Elastic Load Balancing to distribute traffic among the instances.
Show answer and explanation
Correct answer: B
Explanation
Amazon ECS with AWS Fargate is the best option for this scenario because it allows the startup to package microservices into containers and deploy them without managing servers. Fargate automatically allocates the right amount of compute resources for each container, enabling independent scaling of microservices and optimizing compute utilization. This minimizes operational overhead and costs, making it an ideal solution for unpredictable traffic patterns.
- A. Incorrect.
While Auto Scaling can handle traffic spikes, EC2 instances require additional management overhead, such as provisioning, patching, and configuring scaling policies. This doesn't fully optimize compute utilization.
- B. Correct.
Using Amazon ECS with AWS Fargate allows for containerized deployment of microservices, where compute resources are managed automatically. Each microservice can scale independently, minimizing costs and operational overhead, while optimizing compute utilization.
- C. Incorrect.
AWS Lambda is a good choice for event-driven architectures, but it may not be suitable if the microservices require long-running processes or consistent compute resources. It also introduces cold start latency in some cases.
- D. Incorrect.
Elastic Load Balancing helps distribute traffic, but using EC2 instances still involves managing the underlying infrastructure, which increases operational overhead and does not fully optimize utilization.