Search Postgresql Archives

Re: pgpool Connections Distributions Among Nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> We have 4-node cluster (1 master and 3 hot standby).  We are using pgpool as load balancer. We have an observation where if 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux