[pgpool-general: 5293] Re: Connections to backends

Tema Zelikin gunslinger at nightflame.info
Fri Feb 3 23:53:04 JST 2017


I understand the weight functionality, that's why i've set weight of the
primary node to 1, and weights of the standby nodes to 0 - so pgpool
will send all queries to master node and won't get data from standby nodes.

I also understand the need to connect to all backends for monitoring
purposes.

What i DONT understand is why in my case pgpool establishes and
maintains a LOT of connections to standby nodes, even when no queries
should be sent to those nodes. 


03.02.2017 11:35, Lazaro Garcia пишет:
> The weights property is used for load balancer functionality, with it you
> can distribute your read queries over your servers for instance 30% to
> master and 70% to slaves.  
>
> Pgpool always tries to connect to servers because failover and swithover
> functionalities. If the primary server fails, it promotes a new master.
> Because of these it needs to know the current state of the servers
> configured in the cluster.    
>
> As a connection pooler, it maintains open the connections to backends for
> future use, suppose an app connects to pgpool, send some queries and then
> disconnect, but this connection is saved in the pool for reutilization.     
>
>  Regards.  
>
> -----Mensaje original-----
> De: pgpool-general-bounces at pgpool.net
> [mailto:pgpool-general-bounces at pgpool.net] En nombre de Tema Zelikin
> Enviado el: viernes, 3 de febrero de 2017 09:50 a. m.
> Para: pgpool-general at pgpool.net
> Asunto: [pgpool-general: 5290] Connections to backends
>
> Hello.
>
> I have a following configuration:
>
> 3 backends with replication in master-slave mode.
> 2 pgpools with delegate_IP and watchdog, with weights of backends as
> following:
> master = 1
> both slaves = 0
>
> My understanding is that pgpool shouldnt make requests to backend nodes with
> weight of 0.
>
> The question is why does pgpool establishes a connections to those nodes?
>
> Second question, something i couldn't understand from reading a
> documentation: why does number of connections to backends is much more than
> number of connections to frontend?
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>



More information about the pgpool-general mailing list