Вопрос

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