SAP-C02 第 473 题
题目
An ecommerce company runs an application on AWS. The application has an Amazon API Gateway API that invokes an AWS Lambda function. The data is stored in an Amazon RDS for PostgreSQL DB instance. During the company’s most recent flash sale, a sudden increase in API calls negatively affected the application's performance. A solutions architect reviewed the Amazon CloudWatch metrics during that time and noticed a significant increase in Lambda invocations and database connections. The CPU utilization also was high on the DB instance. What should the solutions architect recommend to optimize the application's performance?
中文翻译:
一家电子商务公司在 AWS 上运行应用程序。该应用程序具有调用 AWS Lambda 函数的 Amazon API Gateway API。数据存储在 Amazon RDS for PostgreSQL 数据库实例中。在该公司最近一次闪购期间,API 调用的突然增加对应用程序的性能产生了负面影响。一位解决方案架构师审查了这段时间内的 Amazon CloudWatch 指标,发现 Lambda 调用和数据库连接显着增加。数据库实例上的 CPU 利用率也很高。解决方案架构师应该建议什么来优化应用程序的性能?
选项
A. Increase the memory of the Lambda function. Modify the Lambda function to close the database connections when the data is retrieved.
中文翻译:
增加 Lambda 函数的内存。修改 Lambda 函数以在检索数据时关闭数据库连接。
B. Add an Amazon ElastiCache for Redis cluster to store the frequently accessed data from the RDS database.
中文翻译:
添加 Amazon ElastiCache for Redis 集群以存储 RDS 数据库中经常访问的数据。
C. Create an RDS proxy by using the Lambda console. Modify the Lambda function to use the proxy endpoint.
中文翻译:
使用 Lambda 控制台创建 RDS 代理。修改 Lambda 函数以使用代理终端节点。
D. Modify the Lambda function to connect to the database outside of the function's handler. Check for an existing database connection before creating a new connection.
中文翻译:
修改 Lambda 函数以连接到函数处理程序外部的数据库。在创建新连接之前检查现有数据库连接。
答案
C
解析
正确答案:C 解析: 本题应选择 C。 正确选项: C. 使用 Lambda 控制台创建 RDS 代理。修改 Lambda 函数以使用代理终端节点。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、RTO/RPO、合规要求等。本题相关考点主要包括:API Gateway、Lambda、RDS、ElastiCache、C...