Is this pgbouncer configuration suitable for a productionenvironment with hundreds of databases?

Поиск
Список
Период
Сортировка
От Lisandro
Тема Is this pgbouncer configuration suitable for a productionenvironment with hundreds of databases?
Дата
Msg-id 1491431343023-5954479.post@n3.nabble.com
обсуждение исходный текст
Ответы Re: Is this pgbouncer configuration suitable for aproduction environment with hundreds of databases?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hi there!

I'm using pgbouncer in front of a PostgreSQL 9.3 instance.
I have hundreds of databases (almost 200 and counting).
The clients connect to pgbouncer always with the same user (there is one
only user).

Currently I have *postgresql max_connections=200*.
My pgbouncer configuration is this (I put only the directives regarding my
question):

[pgbouncer]
pool_mode = transaction
max_client_conn = 10000
default_pool_size = 2
min_pool_size = 0
reserve_pool_size = 2
reserve_pool_timeout = 5
max_db_connections = 5
server_idle_timeout = 30

[databases]
db1 = host=localhost port=6543 dbname=db1
db2...
db3...

Notice that I don't set a pool_size for every database, but instead I use
the general default_pool_size.

Our project is growing, and we are constantly adding new databases, so it's
a matter of time that we reach the number of 300 or 400 databases. Most of
the databases have low activity (websites with very few traffic).

So, considering that we have set postgresql max_connections=200, then
(correct me if I'm wrong) we would be reaching the postgresql limit of
max_connections soon.

The question is: can I set default_pool_size=0 to avoid reaching the
postgres limit? Is that suitable?
*My goal is to find a pgbouncer configuration that allows me to add
databases without worring about reaching the postgresql max_connection=200
limit. How can I achieve that?*

Thanks in advance!
Regards,
Lisandro.



--
View this message in context:
http://www.postgresql-archive.org/Is-this-pgbouncer-configuration-suitable-for-a-production-environment-with-hundreds-of-databases-tp5954479.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: browser interface to forums please?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Is this pgbouncer configuration suitable for aproduction environment with hundreds of databases?