
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company hosts a website analytics application on a single Amazon EC2 On-Demand Instance. The analytics software is written in PHP and uses a MySQL database. The analytics software, the web server that provides PHP, and the database server are all hosted on the EC2 instance. 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?
A
Migrate the database to an Amazon RDS for MySQL DB instance. Create an 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 to each EC2 instance.
B
Migrate the database to an Amazon RDS for MySQL DB instance. Create an AMI of the web application. Use the AMI to launch a second EC2 On-Demand Instance. Use Amazon Route 53 weighted routing to distribute the load across the two EC2 instances.
C
Migrate the database to an Amazon Aurora MySQL DB instance. Create an AWS Lambda function to stop the EC2 instance and change the instance type. Create an Amazon CloudWatch alarm to invoke the Lambda function when CPU utilization surpasses 75%.
D
Migrate the database to an Amazon Aurora MySQL DB instance. Create an AMI of the web application. Apply the AMI to a launch template. Create an Auto Scaling group with the launch template. Configure the launch template to use a Spot Fleet. Attach an Application Load Balancer to the Auto Scaling group.
Explanation:
Option D is the most cost-effective solution that meets the requirements for seamless scaling:
Option A: Uses On-Demand Instances which are more expensive than Spot Instances. While it provides some scaling, it's not as cost-effective as using Spot Fleet.
Option B: Uses Route 53 weighted routing which is not as efficient for load distribution as an Application Load Balancer. Route 53 is DNS-based and doesn't provide real-time health checks or connection draining.
Option C: Only changes the instance type (vertical scaling) rather than adding more instances (horizontal scaling). This doesn't provide true seamless scaling and requires stopping the instance to change type, causing downtime.
This solution addresses both the performance degradation during busy times and the 5xx errors by providing a scalable, cost-effective architecture.