
Answer-first summary for fast verification
Answer: Implement Amazon RDS Proxy to establish a proxy for the DB cluster, set up a read-only endpoint for the proxy, and reconfigure the Lambda function to connect to this proxy endpoint.
The correct answer is A. Implementing Amazon RDS Proxy will help manage the connections efficiently by pooling and reusing existing connections, which reduces the overhead of opening and closing connections frequently. Configuring a read-only endpoint for RDS Proxy allows the application to distribute read-only requests effectively across the Aurora replica instances. This solution enhances the application's reliability during high traffic periods by preventing the database from being overwhelmed with too many connections. Options B, C, and D introduce changes that may not address the core issue of frequent short-lived connections as effectively as RDS Proxy does.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company's application, which runs on AWS Lambda, utilizes an Amazon Aurora PostgreSQL DB cluster consisting of one small primary instance and three larger replica instances for read-only operations. During high traffic periods, the application's reliability diminishes due to an excessive number of database connections. Given the unpredictable nature of these traffic spikes, which solution will enhance the application's reliability?
A
Implement Amazon RDS Proxy to establish a proxy for the DB cluster, set up a read-only endpoint for the proxy, and reconfigure the Lambda function to connect to this proxy endpoint.
B
Adjust the max_connections parameter in the DB cluster's configuration, restart all instances within the cluster, and update the Lambda function to connect to the DB cluster's primary endpoint.
C
Set up dynamic scaling for the DB cluster instances based on the DatabaseConnections metric approaching the max connections limit, and modify the Lambda function to connect to the Aurora reader endpoint.
D
Deploy Amazon RDS Proxy for the DB cluster, configure a read-only endpoint for the Aurora Data API through the proxy, and direct the Lambda function to connect to this proxy endpoint.