pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgpool Connections Distributions Among Nodes
5+ messages / 4 participants
[nested] [flat]

* pgpool Connections Distributions Among Nodes
@ 2018-01-29 16:19 Kumar, Virendra <Virendra.Kumar@guycarp.com>
  2018-01-29 16:52 ` Re: pgpool Connections Distributions Among Nodes Adrian Klaver <adrian.klaver@aklaver.com>
  2018-01-29 16:52 ` Re: pgpool Connections Distributions Among Nodes Glauco Torres <torres.glauco@gmail.com>
  2018-01-29 22:46 ` Re: pgpool Connections Distributions Among Nodes Tatsuo Ishii <ishii@sraoss.co.jp>
  0 siblings, 3 replies; 5+ messages in thread

From: Kumar, Virendra @ 2018-01-29 16:19 UTC (permalink / raw)
  To: pgsql-general

Hi Gurus,

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.

Can somebody shed some light on it.

Please let me know if you need more information.

Regards,
Virendra


________________________________

This message is intended only for the use of the addressee and may contain
information that is PRIVILEGED AND CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please erase all copies of the message
and its attachments and notify the sender immediately. Thank you.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgpool Connections Distributions Among Nodes
  2018-01-29 16:19 pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
@ 2018-01-29 16:52 ` Adrian Klaver <adrian.klaver@aklaver.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Adrian Klaver @ 2018-01-29 16:52 UTC (permalink / raw)
  To: Kumar, Virendra <Virendra.Kumar@guycarp.com>; pgsql-general

On 01/29/2018 08:19 AM, Kumar, Virendra wrote:
> Hi Gurus,
> 
> 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.
> 
> Can somebody shed some light on it.
> 
> Please let me know if you need more information.

I would say the contents of your config file at the least.

> 
> Regards,
> 
> Virendra
> 
> 



-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgpool Connections Distributions Among Nodes
  2018-01-29 16:19 pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
@ 2018-01-29 16:52 ` Glauco Torres <torres.glauco@gmail.com>
  2018-01-29 17:00   ` RE: pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
  2 siblings, 1 reply; 5+ messages in thread

From: Glauco Torres @ 2018-01-29 16:52 UTC (permalink / raw)
  To: Kumar, Virendra <Virendra.Kumar@guycarp.com>; +Cc: pgsql-general

>
>
>
>
> 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.
>
>
>
> Can somebody shed some light on it.
>
>
>
> Please let me know if you need more information.
>
>
>
Hello,

Which version pgpool you are using?

How did you balance the reading by pgpool? Should all readings go to the
replicas? or reading goes to all nodes?

Regards,

Glauco Torres

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: pgpool Connections Distributions Among Nodes
  2018-01-29 16:19 pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
  2018-01-29 16:52 ` Re: pgpool Connections Distributions Among Nodes Glauco Torres <torres.glauco@gmail.com>
@ 2018-01-29 17:00   ` Kumar, Virendra <Virendra.Kumar@guycarp.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Kumar, Virendra @ 2018-01-29 17:00 UTC (permalink / raw)
  To: Glauco Torres <torres.glauco@gmail.com>; +Cc: pgsql-general

Attached is config file.


[pgpool@usdf23v0550 ~]$ pgpool -v
pgpool-II version 3.7.1 (amefuriboshi)

Reading should go to all nodes.

Regards,
Virendra
From: Glauco Torres [mailto:torres.glauco@gmail.com]
Sent: Monday, January 29, 2018 11:53 AM
To: Kumar, Virendra
Cc: pgsql-general@postgresql.org
Subject: Re: pgpool Connections Distributions Among Nodes



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.

Can somebody shed some light on it.

Please let me know if you need more information.


Hello,
Which version pgpool you are using?
How did you balance the reading by pgpool? Should all readings go to the replicas? or reading goes to all nodes?
Regards,
Glauco Torres

________________________________

This message is intended only for the use of the addressee and may contain
information that is PRIVILEGED AND CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please erase all copies of the message
and its attachments and notify the sender immediately. Thank you.


Attachments:

  pgpool.conf (application/octet-stream, 34.7K) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgpool Connections Distributions Among Nodes
  2018-01-29 16:19 pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
@ 2018-01-29 22:46 ` Tatsuo Ishii <ishii@sraoss.co.jp>
  2 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2018-01-29 22:46 UTC (permalink / raw)
  To: Virendra.Kumar@guycarp.com; +Cc: pgsql-general

> 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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2018-01-29 22:46 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 16:19 pgpool Connections Distributions Among Nodes Kumar, Virendra <Virendra.Kumar@guycarp.com>
2018-01-29 16:52 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-01-29 16:52 ` Glauco Torres <torres.glauco@gmail.com>
2018-01-29 17:00   ` Kumar, Virendra <Virendra.Kumar@guycarp.com>
2018-01-29 22:46 ` Tatsuo Ishii <ishii@sraoss.co.jp>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox