I was using BoneCP for my Java projects. But, unfortunately, I discovered that this pool is unable to recover after the database failure. I am not the only one with such problem (just look at the official forums if you want). As I (and many others) never got answer on bonecp forums, it seems that this project is no longer supported and my issue is unlikely to be fixed.
So, I am looking for an alternative actively developed and supported connection pooling library which is able to handle database outages correctly and recover as soon as database is available again.
There are multiple JDBC frameworks for connection pooling the most popular choices being Tomcat JDBC and HikariCP. Whatever framework you choose it's important to configure the properties correctly, (a big plus of HikariCP is that it offers good defaults for optional configs).
Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.
Database connection pooling is still achieved through application module pooling. The only exception is when multiple application module pools (and therefore a large number of application module instances) share the same database, making the total available database connections the highest priority.
For optimal performance, use a pool with eight to 16 connections per node. For example, if you have four nodes configured, then the steady-pool size must be set to 32 and the maximum pool size must be 64. Adjust the Idle Timeout and Pool Resize Quantity values based on monitoring statistics.
The other major contenders are
You might want to look at https://github.com/brettwooldridge/HikariCP. The speed claims are staggering, but it's new and YMMV.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With