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

Bo Peng pengbo at sraoss.co.jp
Mon Jun 22 11:39:20 JST 2020


Ishii-san, Usama,

Thank you for your advice.
I have some questions about heartbeat related parameters.

I would like to change the watchdog related parameters as follow:

----------------------
wd_hostname0 =                  
pgpool_port0 = 
wd_port0 = 

wd_hostname1 =                  
pgpool_port1 = 
wd_port1 =
.
.
.

heartbeat_hostname0 =
heartbeat_port0 =
heartbeat_device0 =

heartbeat_hostname1 =
heartbeat_port1 =
heartbeat_device1 =
----------------------

However, during the implementation, I noticed more than one network interface
can be specified to send/receive heartbeat signal in Pgpool-II.

Because only one "wd_heartbeat_port" can be specified,
"heartbeat_destination_portX" should be specified with the same port number?


For example: 3 pgpool node, heartbeat with 2 NIC

Should we configure heartbeat paramaters as below?

---------------
wd_heartbeat_port = 9694

heartbeat_destination0 = "192.168.37.102"
heartbeat_destination1 = '192.168.54.102'
heartbeat_destination_port0 = 9694 
heartbeat_destination_port1 = 9694 
heartbeat_device0 = 'eth0'
heartbeat_device1 = 'eth1'

heartbeat_destination2 = '192.168.37.103'
heartbeat_destination3 = '192.168.54.103'
heartbeat_destination_port2 = 9694 
heartbeat_destination_port3 = 9694 
heartbeat_device2 = 'eth0'
heartbeat_device3 = 'eth1'
---------------


If above is correct, I would like to design the heartbeat paramaters as below:
If it is the own node settings, "heartbeat_hostname" and "heartbeat_device" will be ignored.

---------------
heartbeat_hostname0 = '192.168.37.101:192.168.54.101'
heartbeat_port0 = 9694
heartbeat_device0 = 'eth0:eth1'

heartbeat_hostname1 = '192.168.37.102:192.168.54.102'
heartbeat_port1 = 9694
heartbeat_device1 = 'eth0:eth1'

heartbeat_hostname2 = '192.168.37.103:192.168.54.103'
heartbeat_port2 = 9694
heartbeat_device2 = 'eth0:eth1'
---------------

What do you think?

On Fri, 20 Dec 2019 16:05:32 +0500
Muhammad Usama <m.usama at gmail.com> wrote:

> 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
> >


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-hackers mailing list