[pgpool-general: 4683] Configuring weight, max_pool and num_init_children for Master/Slave streaming replication.

Hu Veja huveja at gmail.com
Sat May 14 01:55:29 JST 2016


Hi,

I've the following scenario:

Master is running in a physical host_1 and two readable Slaves are running
in the physical host_2 and host_3 respectively. The scenario is configured
with Asynchronous streaming replication using a Physical Replication Slot.

I'm trying to have the following:

(a) Be able to serve 12 concurrent connections in host_1 (i.e. Master). It
is because that is approximately the number of concurrent writes that I
have. The server has 6 cores and 2 SDDs.

(b) Be able to serve 30 concurrent connections in host_2 and host_3 (i.e.
30 in each host). I've around 60 concurrent reads, and each server is
having 12 cores and 2 SDDs.

The questions I have are the following:

**************
1. In order to try to redirect most of the reads to host_2 and host_3, I
have set "weight" for host_1 to 1, "weight" for host_2 to 2 and "weight"
for host_3 to 2.  Is it OK?

**************
2. How do I need to configure "max_pool" and "num_init_children" in order
to have (a) and (b)?

I suppose that the needed configuration is "num_init_children" = 75 (12 +
30 + 30), and "max_pool" =1 (because the application is using 1 user
-db_usr- and it is connecting to the same database -my_db-).

What I don't have clear is if the pair {num_init_children, max_pool} is
applied as a whole to all the Postgres server behind of pgpool (i.e.
host_1, host_2 and host_3), or it is applied to each Postgres server behind
of pgpool. Then in the last case, I will need to set "num_init_children" =
30 and "max_pool" =1.
**************

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160513/30aa3865/attachment.html>


More information about the pgpool-general mailing list