Q57 — AWS SAA-C03 第3章

第 57/65 题 | ← 返回第3章

Q187.一家公司在单个 Amazon EC2 按需实例上托管网站分析应用程序.分析软件是用 PHP 编写的,并使用 MySQL 数据库.分析软件. 提供 PHP 的 Web 服务器和数据库服务器都托管在 EC2 实例上.该应用程序在繁忙时段表现出性能下降的迹象,并出现 5xx 错误.公司需要无缝扩展应用程序.哪种解决方案能够最经济有效地满足这些要求?

正确答案: A. 将数据库迁移到 Amazon RDS for MySQL 数据库实例.创建 Web 应用程序的 AMI.使用 AMI 启动第二个 EC2 按需实例.使用 Application Load Balancer 将负载分配给每个 EC2 实例.

解析

这个题目很多人选择D,但是经过专家仔细研究,最终由D改成A答案,若考生在考试过程中遇到此题,自行决定选择A还是D。This solution addresses the scalability and performance issues by migrating the database to Amazon RDS for MySQL, which takes care of the heavy lifting of database scaling, replication, and backups. Additionally, creating an AMI of the web application and launching a second EC2 instance with an Application Load Balancer provides scalability and availability. The load balancer balances traffic to each instance, and additional instances can be added as needed to meet demand.Option B, using Amazon Route 53 weighted routing, would distribute traffic based on a weighted routing policy, but it is not as effective in managing performance issues during peak times as an Application Load Balancer.Option C involves automating the process of stopping and reconfiguring EC2 instances using Lambda functions triggered by CloudWatch alarms, which is more complex and suited for a more advanced use case.Option D, while utilizing an Auto Scaling group and launch template, involves using spot instances which can be less stable than On-Demand Instances and may not always be available when needed, which is not ideal for a critical web analytics application. 该解决方案通过将数据库迁移到MySQL的Amazon RDS来解决可伸缩性和性能问题,后者负责数据库扩展、复制和备份的繁重工作。此外,创建web应用程序的AMI并使用应用程序负载均衡器启动第二个EC2实例提供了可伸缩性和可用性。负载平衡器平衡到每个实例的流量,并且可以根据需要添加其他实例以满足需求。 选项B使用Amazon Route 53加权路由,将基于加权路由策略分配流量,但在高峰时间管理性能问题时,它不如应用程序负载均衡器有效。 选项C涉及使用CloudWatch警报触发的Lambda函数自动停止和重新配置EC2实例的过程,这更复杂,适合更高级的用例。 选项D,虽然使用Auto Scaling组和启动模板,但涉及到使用现货实例,这可能比按需实例更不稳定,并且可能在需要时并不总是可用,这对于关键的web分析应用程序来说不是理想的。