<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello.</p>
    <p>I red this article about health_check_* options:
      <a class="moz-txt-link-freetext" href="http://pgsqlpgpool.blogspot.com/2013/09/health-check-parameters.html">http://pgsqlpgpool.blogspot.com/2013/09/health-check-parameters.html</a>
      and i liitle confised, because author of article was wrote, that:</p>
    <p>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      Please note that "health_check_max_retries *
      (health_check_timeout+health_check_retry_delay)" should be smaller
      than health_check_period.</p>
    <p>In can't find about it in official pgpool documentation. It is
      really required?</p>
    <p><br>
    </p>
    <p>And second question. I'm testing those options on Google Cloud
      servers, with the following options:</p>
    <p>health_check_period = 60<br>
      health_check_timeout = 10<br>
      health_check_max_retries = 3<br>
      health_check_retry_delay = 7</p>
    <p>(health_check_period=60 because of above article). I use also
      repmgr with connect_timeout=10s, so whole time switch is about 2
      minutes, i.e. (time: mm:ss):<br>
    </p>
    <p>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      39:03 - master node goes down<br style="color: rgb(51, 51, 51);
        font-family: Arial, sans-serif; font-size: 14px; font-style:
        normal; font-variant: normal; font-weight: normal;
        letter-spacing: normal; line-height: 20px; orphans: auto;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 1; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
        245);">
      39:51 - pgpool see, that is problem to connect<br style="color:
        rgb(51, 51, 51); font-family: Arial, sans-serif; font-size:
        14px; font-style: normal; font-variant: normal; font-weight:
        normal; letter-spacing: normal; line-height: 20px; orphans:
        auto; text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 1; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
        245);">
      40:08 - failed mode, retry 1<br style="color: rgb(51, 51, 51);
        font-family: Arial, sans-serif; font-size: 14px; font-style:
        normal; font-variant: normal; font-weight: normal;
        letter-spacing: normal; line-height: 20px; orphans: auto;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 1; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
        245);">
      40:25 - retry 2 (time between retry 1 and retry 2: 10 sec for
      connect timeout and 7 second for delay for next retry)<br
        style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
        font-size: 14px; font-style: normal; font-variant: normal;
        font-weight: normal; letter-spacing: normal; line-height: 20px;
        orphans: auto; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 1;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(245, 245, 245);">
      40:42 - retry 3<br style="color: rgb(51, 51, 51); font-family:
        Arial, sans-serif; font-size: 14px; font-style: normal;
        font-variant: normal; font-weight: normal; letter-spacing:
        normal; line-height: 20px; orphans: auto; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(245, 245, 245);">
      40:52 - pgpool mark node as a down, and run failover script (10s
      timeout after retry 3)<br style="color: rgb(51, 51, 51);
        font-family: Arial, sans-serif; font-size: 14px; font-style:
        normal; font-variant: normal; font-weight: normal;
        letter-spacing: normal; line-height: 20px; orphans: auto;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 1; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
        245);">
      41:02 - promoting slave as a master through repmgr (repmgr
      checking, that old master really not working, so next 10s, because
      of timeout)</p>
    <p><br>
    </p>
    <p>I use health_check_retry_delay = 7 for situation, when i.e.
      postgresql instance not works but server works, so any attepmt to
      connect are immediately rejected, so timeout is very short, and
      time for failover is also very short.</p>
    <p>So I'm thinking about shorter time health_check_period and also
      connect timeout. I set 10s, but what do you think, what value will
      be good in cloud services (AWS, Google Cloud etc). Load on
      postgres servers is low/medium.</p>
    <pre wrap="">Best regards,
Kris
</pre>
    <p>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
    </p>
  </body>
</html>