Amazon RDS Proxy — Manage and reuse connections

Improve scalability, disaster recovery and security

Sapna Mandhare
3 min readMay 11, 2024

Databases are integral components of application architecture, significantly impacting the scalability and performance of the overall system. The availability, scalability, and efficiency of the databases directly influence the capabilities and responsiveness of the application.

In this blog post, we will look at how Amazon RDS proxy aims to simplify and optimize database scalability and availability for applications.

Understanding Amazon RDS Proxy

Amazon RDS Proxy is a fully managed, highly available database proxy for Amazon RDS that makes applications more scalable, resilient to database failures, and more secure. It sits between application and RDS database instances, managing connections to the database on behalf of the application. This helps offload some of the resource-intensive tasks from database instances, such as connection management and pooling.

Amazon RDS proxy flow

The client applications are pointed towards Amazon RDS proxy. Amazon RDS proxy pools and shares the database connections. The Amazon RDS databases receive the traffic from application through the Amazon RDS proxy.

Benefits of Amazon RDS proxy

Increased scalability
Amazon RDS proxy is serverless and can scale automatically. If there are multiple applications directly routed to RDS proxy, RDS proxy pools and shares the connections directly with the database and ensures that the information is persisted. Sharing of connections is achieved using connection multiplexing. It essentially means while an application is done using a connection and there is a gap between the next usage, the same connection can be used to serve another application.

RDS Proxy Connection Pooling

Increased availability
Amazon RDS proxy preserves the application connections during database failover. It also queues the requests that are made during failover. If there is a failure to the primary database, Amazon RDS proxy will redirect the connections to new and active database. Amazon RDS proxy helps to detect failure and reroute the traffic to standby quickly (almost 66% faster than traditional connection). Amazon RDS proxy supports Multi-AZ ensuring protection from infrastructure failure.

RDS Proxy Failover

Security
RDS Proxy integrates with AWS Secrets Manager and can be used to store database credentials .RDS Proxy integrates with AWS Identity and Access Management (IAM) for authentication and authorization, adding an extra layer of security to database infrastructure. It also supports encryption in transit using SSL/TLS.

RDS Proxy Security

Performance Optimization
With connection pooling and efficient connection management, RDS Proxy reduces latency and improves the overall performance of database interactions. This leads to faster response times and a better user experience.

Conclusion
Amazon RDS proxy is excellent for applications with unpredictable workloads, that open/close connections infrequently, require availability though failures, have open but idle connections. RDS Proxy can play a crucial role in ensuring the reliability and efficiency of database infrastructure on AWS while running a small-scale application or a large enterprise workload.

References and Further Reading

https://aws.amazon.com/rds/proxy/

--

--

Sapna Mandhare

Senior Architect @Capgemini | Architecting and engineering large scale cloud & on-premise solutions | Interested in serverless, AI/ML & cloud native solutions