On 1/26/23 03:00, Thomas Meyer wrote:

Am 18. Januar 2023 23:20:29 MEZ schrieb Christopher Schultz 

On 1/17/23 13:33, Thomas Meyer wrote:
Does Tomcat's CP support exponential backoff in case DB is unavailable for some 
I didn't find anything in the documentation in this regards.

I don't think is supports any such thing. What would be the purpose of 
exponential back-off... don't you want to connect ASAP?


Not really sure, but I think the idea is to protect the database from getting 
overloaded with requests once it's coming up again.

Sadly the description given in

Is very vague and I think won't really help much to mitigate above problem, if 

I found this interesting article and test class that tries to demonstrate the 
resp. behavior of the situation:

There seems also to be an reply to above benchmark from the vibur dbcp author, 
which has some interesting points:

While investigating the reason of why exponential backoff would make sense I 
also did stumble across this article:

This article make much more sense in my head, I.e. use exponential backoff with jitter to 
protect the restarting database from getting "flooded".

But HikariCP does only support plain exponential backoff and probably won't 
help much in above described situation, because once the database is starting 
to accept connections again, all HikariCP connections will probably align at 
the same time to start creating connections again.

If you are worried abou tyour database being flooded with requests, you should limit the number of connections your database will accept /at the database/.

If you have 10 applications connecting to the db each with their own connection pools, even exponential backoff won't help avoid all of them (separately!) flooding the database.


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to