Enhance connection fail-over with master/slave restriction and loadbalancing #209
If multiple hosts are specified in the jdbc connection url then:
Based on work by email@example.com from 2011. I rewrote most of the code, added more documentation and integrated properly the tests.
Because the load-balancing and fail-over is in the pgjdbc driver, below the connection pool there is no specific support needed in the pool. It just must be able to pass in the required parameters down to the driver to enable this feature (which I'm sure all pools already support).
If on the other hand you would like to monitor which connection is actually active from your application side then I think we need to think what would be the best way to export that information. Would it be through JMX for example. In that case we could even use JMX to allow remotely trigger a fail-over or fall-back.
And about your question about jdbc connection pools. I would go either with the HikariCP or tomcat-jdbc (which can be used as a standalone pool outside tomcat container).