Learn the most cost-effective steps to resolve CPU bottlenecks and scale a monolithic web application hosted on Amazon EC2 to improve performance and availability.
Table of Contents
Question
A company hosts a monolithic web application on an Amazon EC2 instance. Application users have recently reported poor performance at specific times. Analysis of Amazon CloudWatch metrics shows that CPU utilization is 100% during the periods of poor performance.
The company wants to resolve this performance issue and improve application availability.
Which combination of steps will meet these requirements MOST cost-effectively? (Choose two.)
A. Use AWS Compute Optimizer to obtain a recommendation for an instance type to scale vertically.
B. Create an Amazon Machine Image (AMI) from the web server. Reference the AMI in a new launch template.
C. Create an Auto Scaling group and an Application Load Balancer to scale vertically.
D. Use AWS Compute Optimizer to obtain a recommendation for an instance type to scale horizontally.
E. Create an Auto Scaling group and an Application Load Balancer to scale horizontally.
Answer
The most cost-effective combination of steps to resolve the performance issues and improve availability for the monolithic web application hosted on an Amazon EC2 instance is:
B. Create an Amazon Machine Image (AMI) from the web server. Reference the AMI in a new launch template.
E. Create an Auto Scaling group and an Application Load Balancer to scale horizontally.
Explanation
The key issue is that the EC2 instance hosting the monolithic web app is experiencing 100% CPU utilization during periods of poor performance. To resolve this, the application needs to be able to scale out horizontally by adding more EC2 instances to handle the load, rather than scaling up vertically with a larger instance size.
Creating an AMI allows you to save the current state of the web server, including the OS, application code, and configurations. Referencing this AMI in a launch template enables Auto Scaling to spin up additional EC2 instances that are pre-configured like the original instance.
An Auto Scaling group uses the launch template to automatically add or remove EC2 instances based on scaling policies and metrics like CPU utilization. This allows the application to scale out during high load periods by adding instances, and scale in when load decreases to optimize costs.
An Application Load Balancer distributes incoming application traffic across the multiple EC2 instances in the Auto Scaling group. It performs health checks and only routes requests to healthy instances.
So in summary, creating an AMI, launch template, Auto Scaling group and Application Load Balancer allows the monolithic application to automatically scale horizontally in a cost-effective manner based on traffic and load. This improves performance by eliminating CPU bottlenecks and increases availability by running the application on multiple instances.
The other options are not ideal because:
- A and D suggest using AWS Compute Optimizer to get vertical or horizontal scaling recommendations, but the question states scaling should be done cost-effectively, and Compute Optimizer recommendations can suggest larger, more costly instance types. Manual effort is also required to implement the recommendations.
- C suggests using an Auto Scaling group and Application Load Balancer to scale vertically, but vertical scaling would not resolve the CPU bottleneck as cost-effectively as horizontal scaling by adding more instances.
Therefore, B and E are the correct combination of steps to meet the requirements most cost-effectively.
Amazon AWS Certified Solutions Architect – Associate SAA-C03 certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Solutions Architect – Associate SAA-C03 exam and earn Amazon AWS Certified Solutions Architect – Associate SAA-C03 certification.