Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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 firstname.lastname@example.org from 2011. I rewrote most of the code, added more documentation and integrated properly the tests.
added a commit
this pull request
Dec 21, 2014
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).