I have a django website where the application and database server are different. I need to install pgbouncer to enable database pooling, however, I'm confused about where to install it: web application server or database server?
Note that in this set up, there is exactly 1 application server and 1 database server.
pgBouncer
can be installed, it depends on your resources and performance. Our company installedpgBouncer
on astand-alone
server (same network with application and database server) because we don't want to share resources ofapplications & database server
withpgBouncer
. However, if you have only two servers. I think you should consider about resources usage on two servers before installingpgBouncer
(you can do severalload-tests
when installed it onapplication server
ordatabase server
).pgBouncer
. Case 1: it is installed sameDB host
and case 2: it is installed in astandalone server
. Then we do someload-tests
over10...3000
concurrent users. As a result, we choose installedpgBouncer
in astandalone server
to increase resources (RAM, CPU) forDB
. However, in development env, we are still usingpgBouncer
in the sameDB host
, it works fine.pgBouncer
in the sameDB host
, then do someload-test
with your application. You can usejMeter
.