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.

有帮助吗?

解决方案

I would recommend first installing it on the database server. That way you can run top (or whatever) on that machine and have a one-stop-shop to see what is going on. Also, the dependencies are more likely to already be installed on the database server than they are on the application server.

If you then notice the database server is more heavily loaded than the app server, you can move it to the app server. But looking at the current loads (when you don't have connection pooling in place) to make that decision isn't going to be terribly useful, because they could change dramatically once you start pooling.

其他提示

This is a official FAQ from pgbouncer web site:

WEB vs DB

许可以下: CC-BY-SA归因
不隶属于 dba.stackexchange
scroll top