Q98 — AWS SAA-C03 Ch.15

Question 98 of 100 | ← Chapter 15

Q1198. A company hosts a website analytics application on a single Amazon EC2 On-Demand Instance.The analytics application is highly resilient and is designed to run in stateless mode.The company notices that the application is showing signs of performance degradation during busy times and is presenting 5xx errors.The company needs to make the application scale seamlessly.Which solution will meet these requirements MOST cost-effectively?

Correct Answer: A. Create an Amazon Machine Image (AMl) of the web application. Use the AMl to launch a second EC2 On-Demand Instance. Use an Application Load Balancer to distribute the load across the two EC2 instances.

Explanation

ADD.To meet the requirement of making the application scale seamlessly and cost-effectively during busy times while addressing performance degradation and 5xx errors, the most suitable solution is:A. Create an Amazon Machine Image (AMI) of the web application. Use the AMI to launch a second EC2 On-Demand Instance. Use an Application Load Balancer to distribute the load across the two EC2 instances.Analysis:Resilience and Scalability: The application is highly resilient and designed to run in stateless mode, which means it can easily scale horizontally by adding more instances. Creating an AMI of the web application allows for quick and consistent deployment of additional instances. Load Distribution: Using an Application Load Balancer (ALB) to distribute the load across multiple EC2 instances ensures that traffic is evenly spread, reducing the risk of any single instance becoming overwhelmed. This helps to mitigate performance degradation and 5xx errors during peak times. Cost-Effectiveness: While this solution involves using On-Demand Instances, it is still cost-effective compared to other options that might involve more complex configurations or higher costs (e.g., Spot Instances, which can be terminated at any time). For a highly resilient, stateless application that needs to scale predictably, On-Demand Instances provide a good balance between cost and reliability.Why the Other Options Are Not Suitable:B. Use Amazon Route 53 weighted routing: While Route 53 weighted routing can distribute traffic, it is not as efficient or flexible as an ALB for load balancing across EC2 instances. An ALB provides more advanced features, such as health checks, session stickiness, and SSL termination, which are beneficial for a web analytics application.C. Use AWS Lambda to stop and change the instance type: This solution is not suitable for scaling the application seamlessly. Stopping and changing the instance type is a manual and time-consuming process that does not address the immediate need for scaling during busy times. Additionally, it does not provide a way to distribute the load across multiple instances.D. Use a Spot Fleet with an Auto Scaling group: While using Spot Instances can be cost-effective, they are not suitable for applications that require high availability and cannot tolerate interruptions. Spot Instances can be terminated by AWS at any time, which could lead to performance issues and 5xx errors if the application is not designed to handle such interruptions. For a highly resilient, stateless application that needs to scale seamlessly, On-Demand Instances are a more reliable choice.