<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2019 at 5:32 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
Subject: [pgpool-hackers: 3480] Proposal: Simplify WATCHDOG host configurations.<br>
Date: Thu, 19 Dec 2019 15:29:42 +0900<br>
Message-ID: <<a href="mailto:20191219152942.854fb365a05419557ba6fa93@sraoss.co.jp" target="_blank">20191219152942.854fb365a05419557ba6fa93@sraoss.co.jp</a>><br>
<br>
> Currently the configuration parameters for WATCHDOG such as:<br>
> <br>
> ---<br>
> wd_hostname<br>
> wd_port<br>
> wd_heartbeat_port<br>
> heartbeat_destination<br>
> heartbeat_destination_port<br>
> other_pgpool_hostname<br>
> other_pgpool_port<br>
> ---<br>
> <br>
> wd_* are the host and port information about the host itself,<br>
> heartbeat_destination* and other_pgpool_* are the other pgpool information <br>
> in the cluster.<br>
> <br>
> This complicates the configuration.<br>
> <br>
> To simplify WATCHDOG configurations,<br>
> I would like to use a common configuration file for each pgpool node,<br>
> and users just copy the configuration file to another node without editing.<br>
> <br>
> To implement, each pgpool should detect its own information and sets it to wd_ *,<br>
> Then, set other pgpool's information to heartbeat_destination* and other_pgpool_*.<br>
<br>
I am afraid detecting pgpool's own information is not so easy. For<br>
example if we use hostname for it's purpose, it may be different from<br>
wd_hostname if the host which pgpool runs on has multiple<br>
IP/hostname. We need to assign an artificial "host id" to each pgpool<br>
node any way. If so, I think it would be better to eliminate:<br>
<br>
> heartbeat_destination<br>
> heartbeat_destination_port<br>
> other_pgpool_hostname<br>
> other_pgpool_port<br>
<br>
completely.<br>
<br>
Instead we will have "pgpool_node_id" (an integer starting from 0) for<br>
each pgpool node, then we will have:<br>
<br>
wd_hostname0<br>
wd_port0<br>
wd_heartbeat_port0<br>
wd_hostname1<br>
wd_port1<br>
wd_heartbeat_port1<br>
wd_hostname2<br>
wd_port2<br>
wd_heartbeat_port2<br>
:<br>
:<br>
<br>
Then pgpool.conf could be identical except pgpool_node_id part. Even<br>
we could have pgpool_id.conf file separate from pgpool.conf so that<br>
all pgpool.conf files are identical on each pgpool host.<br></blockquote><div><br></div><div>IMHO this seems a better approach, and I believe zookeeper also follows a similar configuration mechanism and identifies the</div><div>local server configuration using the separate myid file.</div><div><br></div><div>Also, I am thinking about what if we use the [<i><b>hostname: port</b></i>] format for specifying the watchdog node instead of using the</div><div>separate configuration parameter for hostname (wd_hostname[x]) and port (wd_port[x]) </div><div>For example:</div><div><br></div><div>wd_server1 = host1:port1</div><div>wd_server2 = host2:port2<br></div><div>..</div><div><br></div><div>Moreover, we can also eliminate the wd_heartbeat_port[x] configuration parameter as well by using</div><div>[<i><b>hostname:port:port</b></i>] format (where the second port corresponds to the heartbead_port number while the first one configures the wd_port number</div><div><br></div><div><br></div><div>Best regards</div><div>Muhammad Usama</div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div></div>