[pgpool-hackers: 3482] Re: Proposal: Simplify WATCHDOG host configurations.

Muhammad Usama m.usama at gmail.com
Fri Dec 20 20:05:32 JST 2019


On Fri, Dec 20, 2019 at 5:32 AM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:

> From: Bo Peng <pengbo at sraoss.co.jp>
> Subject: [pgpool-hackers: 3480] Proposal: Simplify WATCHDOG host
> configurations.
> Date: Thu, 19 Dec 2019 15:29:42 +0900
> Message-ID: <20191219152942.854fb365a05419557ba6fa93 at sraoss.co.jp>
>
> > Currently the configuration parameters for WATCHDOG such as:
> >
> > ---
> > wd_hostname
> > wd_port
> > wd_heartbeat_port
> > heartbeat_destination
> > heartbeat_destination_port
> > other_pgpool_hostname
> > other_pgpool_port
> > ---
> >
> > wd_* are the host and port information about the host itself,
> > heartbeat_destination* and other_pgpool_* are the other pgpool
> information
> > in the cluster.
> >
> > This complicates the configuration.
> >
> > To simplify WATCHDOG configurations,
> > I would like to use a common configuration file for each pgpool node,
> > and users just copy the configuration file to another node without
> editing.
> >
> > To implement, each pgpool should detect its own information and sets it
> to wd_ *,
> > Then, set other pgpool's information to heartbeat_destination* and
> other_pgpool_*.
>
> I am afraid detecting pgpool's own information is not so easy. For
> example if we use hostname for it's purpose, it may be different from
> wd_hostname if the host which pgpool runs on has multiple
> IP/hostname. We need to assign an artificial "host id" to each pgpool
> node any way. If so, I think it would be better to eliminate:
>
> > heartbeat_destination
> > heartbeat_destination_port
> > other_pgpool_hostname
> > other_pgpool_port
>
> completely.
>
> Instead we will have "pgpool_node_id" (an integer starting from 0) for
> each pgpool node, then we will have:
>
> wd_hostname0
> wd_port0
> wd_heartbeat_port0
> wd_hostname1
> wd_port1
> wd_heartbeat_port1
> wd_hostname2
> wd_port2
> wd_heartbeat_port2
> :
> :
>
> Then pgpool.conf could be identical except pgpool_node_id part. Even
> we could have pgpool_id.conf file separate from pgpool.conf so that
> all pgpool.conf files are identical on each pgpool host.
>

IMHO this seems a better approach, and I believe zookeeper also follows a
similar configuration mechanism and identifies the
local server configuration using the separate myid file.

Also, I am thinking about what if we use the [*hostname: port*] format for
specifying the watchdog node instead of using the
separate configuration parameter for hostname (wd_hostname[x]) and port
(wd_port[x])
For example:

wd_server1 = host1:port1
wd_server2 = host2:port2
..

Moreover, we can also eliminate the wd_heartbeat_port[x] configuration
parameter as well by using
[*hostname:port:port*] format (where the second port corresponds to the
heartbead_port number while the first one configures the wd_port number


Best regards
Muhammad Usama




> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20191220/44d843c4/attachment.html>


More information about the pgpool-hackers mailing list