View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000521||Pgpool-II||Enhancement||public||2019-06-13 18:53||2019-06-18 12:20|
|Platform||aws ec2 instance||OS||ubuntu||OS Version||Ubuntu 16.04.6 L|
|Target Version||Fixed in Version|
|Summary||0000521: In streaming replication mode, load balancing mode on, load balancing happens only for executing queries not for db connections.|
|Description||My use case is that I have two read replicas. The settings between master db and replicas are done in aws rds. I would like to use pgpool-2 to do connection pooling and load balancing. I notice that whenever a db connection request made to pgpool, pgpool always open a connection on both replicas. E.g. if I test with `pgbench -c 20 -t 1000`, pgpool will open 20 connections on replica1 and 20 connection connections on replica2. May I know if there is a way to split the 20 connections evenly to both replicas, e.g. open 10 connections to replica1 and 10 connections to replica2. |
My pgpool.conf followed pgpool.conf.sample-stream.
Thank you very much for you time.
|Tags||connection splitting, load balancing, replication|
It is normal behavior when you use load balancing.
Because Pgpool-II sends WRITE query to primary and READ query to standby, Pgpool-II need to open connections to both of master db and replica db.
Did you setup the cluster including Pgpool-II and 3 DB nodes(1 master, 2 replicas)?
Or you setup the cluster only including Pgpool-II and 2 replicas?
||Hi @pengbo, thank you so much for replying. My existing setup includes only two ec2 instances running Pgpool and 2 rds db replicas. The master db is not included. Also I have some logic to make sure only read query can go to pgpool.|
||May I know if we have any setting in pgpool.conf that I can twist, to kind of splitting / load balance the connections to the 2 replicas, e.g. when there are 20 connection request comes to pgpool, pgpool will open 10 connections to replica1 and 10 to the other replica. Thanks|
> May I know if we have any setting in pgpool.conf that I can twist, to kind of splitting / load balance the connections to the 2 replicas, e.g. when there are 20 connection request comes to > pgpool, pgpool will open 10 connections to replica1 and 10 to the other replica. Thanks
Pgpool-II opens connections to all backend nodes. The connection target node can not be configured.
||Got it, thank you @pengbo.|
||Could you mark this issue status as "resolved"?|
||Hi, may I know how to change the status to 'resolved'? I don't see any edit or control panel. Thanks.|
Edit -> Status -> Resolved.
I will mark this as "Resolved".
|2019-06-13 18:53||druidccsos||New Issue|
|2019-06-13 18:54||druidccsos||Tag Attached: load balancing|
|2019-06-13 18:54||druidccsos||Tag Attached: replication|
|2019-06-13 18:54||druidccsos||Tag Attached: connection splitting|
|2019-06-14 10:00||pengbo||Assigned To||=> pengbo|
|2019-06-14 10:00||pengbo||Status||new => assigned|
|2019-06-14 10:10||pengbo||Note Added: 0002655|
|2019-06-14 10:10||pengbo||Status||assigned => feedback|
|2019-06-14 11:42||druidccsos||Note Added: 0002656|
|2019-06-14 11:42||druidccsos||Status||feedback => assigned|
|2019-06-14 12:10||druidccsos||Note Added: 0002657|
|2019-06-17 14:18||pengbo||Note Added: 0002658|
|2019-06-17 14:19||pengbo||Status||assigned => feedback|
|2019-06-17 14:19||druidccsos||Note Added: 0002659|
|2019-06-17 14:19||druidccsos||Status||feedback => assigned|
|2019-06-17 22:14||pengbo||Note Added: 0002660|
|2019-06-18 11:23||druidccsos||Note Added: 0002662|
|2019-06-18 12:19||pengbo||Note Added: 0002663|
|2019-06-18 12:20||pengbo||Status||assigned => resolved|