Q42 — AWS SAA-C03 Ch.16
Question 42 of 100 | ← Chapter 16
Q1242. A company runs a serverless application that uses Amazon RDS as a backend database on AWS. The application sometimes experiences an unpredictable increase in traffic. During traffic spikes,the application frequently opens and closes connections to the database. The traffic spikes cause the application to receive errors from the database or to run out of connections. The company needs to ensure that the application is always scalable and highly available.Which solution will meet these requirements WITHOUT any changes to the application code?
- A. Increase the maximum number of connections in the parameter group of the RDS database.
- B. Enable Multi-AZ deployment for the RDS database instance to handle connection management.
- C. Deploy Amazon RDS Proxy between the serverless application and Amazon RDS ✓
- D. Purchase Reserved Instances for Amazon RDS to ensure that the database is highly available during peak load traffic.
Correct Answer: C. Deploy Amazon RDS Proxy between the serverless application and Amazon RDS
Explanation
The company's serverless application experiences unpredictable traffic spikes, leading to frequent database connection openings/closings, connection errors, and running out of connections. The goal is to ensure scalability and high availability without modifying the application code.Key Issues:Connection exhaustion (running out of connections during spikes). High connection churn (frequent open/close operations, which can degrade performance). Need for scalability and high availability without code changes.Analysis of Options:A. Increase the maximum number of connections in the parameter group of the RDS database.Pros: Temporarily increases the connection limit.Cons:Does not solve the root cause (connection churn and inefficiency). RDS still has a hard limit on connections (e.g., ~16,000 for MySQL).Scalability is not improved--just delays the problem.Conclusion: Not a sustainable solution.B. Enable Multi-AZ deployment for the RDS database instance to handle connection management.Pros: Provides high availability (failover support).Cons:Does not help with connection management (Multi-AZ is for failover, not connection pooling). Does not prevent connection exhaustion or improve scalability.Conclusion: Irrelevant to the problem.C. Deploy Amazon RDS Proxy between the serverless application and Amazon RDS.Pros:Manages connection pooling, reducing the need to open/close connections frequently.Improves scalability by reusing connections efficiently.Prevents connection exhaustion by sharing connections among applications.Highly available (works with Multi-AZ RDS).Requires no application code changes (works transparently).Cons: None significant for this use case.Conclusion: Best solution--directly addresses connection management and scalability. D. Purchase Reserved Instances for Amazon RDS to ensure that the database is highly available during peak load traffic.Pros: Reduces costs for predictable workloads.Cons:Does not improve scalability (Reserved Instances are for cost savings, not performance). High availability is already provided by Multi-AZ (not by Reserved Instances).Does not solve connection exhaustion.Conclusion: Irrelevant to the problem.Final Answer:C. Deploy Amazon RDS Proxy between the serverless application and Amazon RDS.Why RDS Proxy is the Best Choice:Connection Pooling: Reduces the overhead of frequent connection openings/closings. Scalability: Handles spikes efficiently without hitting connection limits.High Availability: Works seamlessly with Multi-AZ RDS.No Code Changes: The application remains unchanged while RDS Proxy manages connections. Serverless-Friendly: Ideal for Lambda-based applications with unpredictable workloads.