[pgpool-hackers: 2289] Re: RFC: New health check implementation

Tatsuo Ishii ishii at sraoss.co.jp
Wed Apr 26 09:32:07 JST 2017


> On Tue, Apr 25, 2017 at 7:24 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
>> Hi Usama,
>>
>> > Hi Ishii-San
>> >
>> > I am working on config framework modification to allow same name
>> parameters
>> > with and without index postfix, I am almost done with the framework
>> related
>> > changes.
>>
>> Thanks!
>>
>> > And now for testing I need to add one such parameter and I was thinking
>> > instead of using a dummy configuration variable for testing I would
>> rather
>> > add the *health_check_period* and *health_check_period[idx]* so that you
>> > can also use it.
>> > For that can you tell me where do you want to create health_check_period
>> > variable for each backend? Is BackendInfo structure is the right place?
>>
>> I'm working on it for the part. I will push it tomorrow. BTW, unlike
>> BackendInfo, the structure does not need to live on the shared memory.
>>
> 
> Sure thanks, And yes you are right  the health_check_period doesn't needs
> to go in shared memory,
> 
> You can just push the structure related changes for the health_check_period
> parameters and I will make it configurable, that way it will save you the
> time and also I will be able to test the changes before pushing the changes.

Thanks. I have just pushed chages to add the data structure along with
sample configuration files changes.

https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=c0d209d76c67fe10690c33d0a982c0fb3b919544

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

>> > Thanks
>> > Best Regards
>> >
>> >
>> > On Mon, Apr 24, 2017 at 7:42 AM, Tatsuo Ishii <ishii at sraoss.co.jp>
>> wrote:
>> >
>> >> >> On 21-Apr-2017, at 4:31 AM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>> >> >>
>> >> >> Usama,
>> >> >>
>> >> >> Is it possible to have following config parameter at the same time?
>> >> >> My feeling is we can't because current implementation of config
>> >> >> handling does not allow it.
>> >> >>
>> >> >> health_check_period = 10
>> >> >> health_check_period0 = 5
>> >> >
>> >> > Yes, having the same named configuration parameter with and without
>> >> index postfix would cause problem with the current implementations, but
>> if
>> >> we want to support this I can tweak the configuration framework to allow
>> >> that.
>> >>
>> >> That would be desirable.
>> >>
>> >> Best regards,
>> >> --
>> >> Tatsuo Ishii
>> >> SRA OSS, Inc. Japan
>> >> English: http://www.sraoss.co.jp/index_en.php
>> >> Japanese:http://www.sraoss.co.jp
>> >>
>> >> > Thanks
>> >> > 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
>> >> >>
>> >> >>> Hi,
>> >> >>>
>> >> >>> This is a Request for Comments on the new implementation of health
>> >> >>> check aiming for Pgpool-II 3.7.
>> >> >>>
>> >> >>> Problems:
>> >> >>>
>> >> >>> Current implementation of health check is a single serial processing
>> >> >>> for all of database nodes. This implies some limitations for health
>> >> >>> check process: 1) it is not possible to specify different health
>> check
>> >> >>> configuration values for each database node, 2) node failure
>> detection
>> >> >>> may take longer. For example, if it takes 10 seconds before
>> detecting
>> >> >>> node 0 failure, then detecting node 1 failure will be delayed at
>> least
>> >> >>> 10 seconds because it starts node failure detection after node 0.
>> >> >>>
>> >> >>> The solution:
>> >> >>>
>> >> >>> Allow to specify health check parameters for each node. Pgpool.conf
>> >> >>> will look like:
>> >> >>>
>> >> >>> health_check_period0 = 10
>> >> >>> health_check_timeout0 = 20
>> >> >>> :
>> >> >>> :
>> >> >>>
>> >> >>> where "0" means database node 0 (similar concept as "backend_*0
>> >> >>> parameters).
>> >> >>>
>> >> >>> To make admin's life easier, current parameters can be used as
>> >> >>> well. Suppose there are 3 nodes, and we have:
>> >> >>>
>> >> >>> health_check_period = 10
>> >> >>> health_check_period0 = 5
>> >> >>>
>> >> >>> then health_check_period for node 1 and 2 will be 10, while
>> >> >>> health_check_period for node 0 will be 5. So parameter names without
>> >> >>> node id works as a "global variable".
>> >> >>>
>> >> >>> The implementation:
>> >> >>>
>> >> >>> Create separate child process of pgpool main process and let do the
>> >> >>> heal check job for each database node. Once the health check child
>> >> >>> process detects node failure, it signals to main process and main
>> >> >>> process will perform failover.
>> >> >>>
>> >> >>> This architecture makes pgpool main process simpler and robust,
>> while
>> >> >>> earlier detection of node failure by the health check child process.
>> >> >>>
>> >> >>> Comments and suggestions are welcome.
>> >> >>>
>> >> >>> 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
>> >>
>>


More information about the pgpool-hackers mailing list