Do you still need an AWS RDS proxy when you already have an application side pooling in place?

3.2k views Asked by At

As a follow-through on this question

Do you still need an AWS RDS proxy when you already have an application side pooling in place?

I have a Springboot application which uses the default HikariDataSource to manage the db connection pool. For the database driver we plan to use is MariaDB Connector/J because it can handle aurora failover and it's also the one recommended by AWS in its documentation. The application has fairly stable small load, not much spikes. But, it should be highly available.

However, we also found RDS proxy which also manages db connection pooling and failover.

I want to use RDS Proxy so that I can ease the burden of managing the db connection pool and handling of failover from the application. But, it seems like I could not turn off the application-side pooling in Springboot (it's in there by default). And I also need a driver to connect to the database so I might as well use the Connector/J. With these stack/tools I have, is an RDS proxy an too much and redundant?

1

There are 1 answers

2
jtoberon On BEST ANSWER

As you point out, AWS is releasing a JDBC driver that also knows how to do faster failover. For example, it knows how to find the right DB instance after a failover, so that you don't have to worry about cached DNS information. If you're happy with the failover functionality of the driver, then RDS Proxy doesn't help.

However, RDS Proxy still adds value in your scenario. For example, let's say that you need to scale your application horizontally. Each instance of your application has its own connection pool, and if you add enough instances then you will exceed the max connections setting of the database. RDS Proxy helps in this scenario by handling the connections from your application, and multiplexing them to connections to the database. RDS Proxy itself will respect the max connections setting of your database.