Q49 — AWS SAA-C03 第3章

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

Q179.一家公司在 Application Load Balancer 后面的 Amazon EC2 实例上运行业务关键 Web 应用程序. EC2 实例位于 Auto Scaling 组中.该应用程序使用部署在单个可用区中的 Amazon Aurora PostgreSQL 数据库.该公司希望应用程序具有高可用性,同时最大限度地减少停机时间和数据丢失.哪种解决方案能够以最少的运营努力满足这些要求?

正确答案: B. 配置 Auto Scaling 组使用多个可用区.将数据库配置为多可用区.为数据库配置 Amazon RDS 代理实例.

解析

To make the application highly available with minimum downtime and minimum loss of data, a company should configure the Auto Scaling group to use multiple Availability Zones and configure the database as Multi-AZ. The company can also configure an Amazon RDS Proxy instance for the database to reduce downtime during failovers. Therefore, option B is the correct answer.Option A suggests placing the EC2 instances in different AWS Regions and using Aurora PostgreSQL Cross-Region Replication. While this approach provides high availability, it requires more operational overhead compared to configuring the Auto Scaling group to use multiple Availability Zones.Option C suggests configuring the Auto Scaling group to use one Availability Zone and generating hourly snapshots of the database. Recovering the database from the snapshots in the event of a failure may result in significant data loss and downtime.Option D suggests configuring the Auto Scaling group to use multiple AWS Regions and writing the data from the application to Amazon S3. Using S3Event Notifications to launch an AWS Lambda function to write the data to the database may result in increased latency and operational overhead compared to configuring the Auto Scaling group to use multiple Availability Zones.By configuring the Auto Scaling group to use multiple Availability Zones, the company can ensure that the application remains available even if one Availability Zone becomes unavailable. Configuring the database as Multi-AZ will ensure that the database is automatically replicated to a standby instance in another Availability Zone, which further increases availability and minimizes downtime during failovers. Using an Amazon RDS Proxy instance for the database ensures that the application can continue to read and write to the database during failovers, reducing downtime and minimizing data loss. This approach meets the requirements stated in the question with minimal operational effort.为了使应用程序在最小停机时间和最小数据丢失的情况下具有高可用性,公司应该配置Auto Scaling组来使用多个可用区,并将数据库配置为Multi-AZ。公司还可以为数据库配置一个Amazon RDS Proxy实例,以减少故障转移期间的停机时间。因此,选项B是正确答案。选项A建议将EC2实例放在不同的AWS区域,并使用Aurora PostgreSQL跨区域复制。虽然这种方法提供了高可用性,但与配置Auto Scaling组使用多个可用区相比,它需要更多的操作开销。选项C建议将Auto Scaling组配置为使用一个可用区,并每小时生成一次数据库快照。如果发生故障,从快照中恢复数据库可能会导致严重的数据丢失和停机时间。选项D建议配置Auto Scaling组以使用多个AWS region,并将数据从应用程序写入Amazon S3。与配置Auto Scaling组使用多个可用区相比,使用S3Event Notifications启动AWS Lambda函数将数据写入数据库可能会增加延迟和操作开销。通过将Auto Scaling组配置为使用多个可用区,公司可以确保即使一个可用区不可用,应用程序仍然可用。将数据库配置为Multi-AZ将确保数据库自动复制到另一个可用区中的备用实例,这将进一步提高可用性并最大限度地减少故障转移期间的停机时间。为数据库使用Amazon RDS Proxy实例可确保应用程序在故障转移期间能够继续读写数据库,从而减少停机时间并最大限度地减少数据丢失。这种方法以最小的操作工作量满足问题中所述的需求。