You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pgjdbc attempts hosts in order (e.g. in strict order or in shuffle order). It does not work well in case there is one host that does not respond.
It would probably make sense to try concurrent connections if the given host did not respond within a configured time.
For instance, consider we have db1,db2,db3 in connection URL.
Try connecting to db1
If db1 did not respond within 500ms, start concurrent connections to db2 and db3
Return the first workable connection to the end user, and close the others
The text was updated successfully, but these errors were encountered:
For the record, I think it's needlessly complicated, non-deterministic, and it's had more than one bug in the past so let's tread carefully. If we do add something like this, is should be opt in as defaulting to creating threadpools or parallel connection is generally a bad idea.
Also, without opt-in, anybody upgrading with multiple resolved hosts would suddenly see connection errors on their server logs for all the "slow" connections as they'd be closed after socket creation but before the full login handshake (and waiting for the handshake to avoid that error is bad for other reasons).
Currently, pgjdbc attempts hosts in order (e.g. in strict order or in shuffle order). It does not work well in case there is one host that does not respond.
It would probably make sense to try concurrent connections if the given host did not respond within a configured time.
For instance, consider we have
db1,db2,db3
in connection URL.db1
db1
did not respond within 500ms, start concurrent connections todb2
anddb3
The text was updated successfully, but these errors were encountered: