My company plans to use pgPool-II in order to benefit of its "Fail Over", "Load Balancing" (and eventually "Replication") features.
We consider here that we have a J2EE Tomcat web application hosted by a servers cluster where Jakarta Tomcat Connector (JK) or similar service is used to do the link between clients and these Tomcat servers (load balancing). Also, we consider that we have a cluster of PostgreSQL 9.3 databases where pgPool-II is used to do the link between the Tomcat servers cluster and the databases cluster. Our application is a multi-user application where each user is associated to a different role (in terms of databases of course).
I learned that pgPool-II use the same protocol than postgreSQL so to connect to the pool we just need to connect to it as we usually connect to a database, right?
In this mail copy, I saw that it's useless to have 2 pool layers, so no need to use JDBC Tomcat pool in addition to pgPool-II. Either we delegate the pool task to JDBC Tomcat pool, either we delegate it to pgPool-II, right?
So my final questions are :
How to properly get connections from pgPool-II with JDBC in that case, must I simply demand a new connection to pgPool-II every time a user need to execute a SQL request? Does not affect performance?
Which part should take charge of pool task in order to obtain the best performance? JDBC Tomcat, pgPool-II or another service like pgBouncer? What is the best approach?
Thanks in advance!
PS : If some points aren't clear, please tell me and I'll edit my post.