A company hosts a PHP-based website analytics application on a single Amazon EC2 On-Demand Instance. The web server, PHP application, and MySQL database all run on that instance. During busy times the application shows performance degradation and 5xx errors. The company needs the application to scale seamlessly and cost-effectively. Which solution best meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: 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..
Why this is the answer
The correct solution offers a comprehensive, scalable, and cost-effective architecture. Migrating to Amazon Aurora MySQL provides a highly available, performant, and scalable database. Creating an AMI and using it with an Auto Scaling group and a launch template allows the application to automatically scale EC2 instances based on demand, addressing performance degradation. Configuring the launch template to use a Spot Fleet significantly reduces compute costs. An Application Load Balancer efficiently distributes traffic across instances, ensuring high availability and seamless scaling. The first incorrect option uses On-Demand instances, which are more expensive than Spot Instances, and lacks automatic scaling. The second incorrect option uses Route 53 weighted routing, which is not designed for dynamic load balancing based on real-time instance health or capacity, and also uses more expensive On-Demand instances without automatic scaling. The third incorrect option attempts to scale by changing instance types, which causes downtime and is not a scalable or cost-effective solution for a web application.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed