Re: pgpool Connections Distributions Among Nodes

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: pgpool Connections Distributions Among Nodes
Дата
Msg-id 20180130.074630.2078004443171957980.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на pgpool Connections Distributions Among Nodes  ("Kumar, Virendra" <Virendra.Kumar@guycarp.com>)
Список pgsql-general
> We have 4-node cluster (1 master and 3 hot standby).  We are using pgpool as load balancer. We have an observation
whereif application requests for 3 connections, pgpool connects to all 4 servers and I see 3 connections on each of
them.I was expecting it have a total of 3 connections from either of 4 servers but I can easily see 12 connections in
all.

Yes, that's an expected behavior.

Why?

When client A connects to pgpool, it connects to all PostgreSQL (a, b,
c, d). But actually pgpool sends query to one of them (in case load
balance node is primary) or two of them (in case load balance node is
not primary). Suppose it sends to a and b. Client A logs off, but
connections to a and b remain because of connection pooling. Client B
comes in. B uses c and d. The connections to c and d remain.

So eventually pgpool needs to connect to all backend anyway.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


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

Предыдущее
От: Ibrahim Edib Kokdemir
Дата:
Сообщение: best way to storing logs
Следующее
От: Jan De Moerloose
Дата:
Сообщение: Meaning of query age in pg_stat_activity