After migrating from 4.2.1 to 4.3.1 with the connection pool changes made in
JAVA-3927 we find that only allowing 2 new connections at a time is too conservative and would like that value to be configurable.
Our setup used to be (we have 60 worker threads in our app):
Due to external factors we need to limit our connection lifetime to 60 seconds, and we have high throughput on our connections, and we need to limit p99 latency spikes which is why we've instructed the driver to time out rather than wait the default 2 seconds.
After upgrading to 4.3.1 we started encountering a LOT of timeouts and changed the settings to:
(changed max wait to 50ms, increased min-size and lowered maintenance freq)
This takes care of MOST of our time-outs, but we still get the occassional one. It has increased our p99/p100 latency by 50ms, and we're essentially wasting 30 threads per host connecting to the DB.
It'd be most appreciated if we could configure MAX_CONNECTING instead of having it as a static final package-private constant.