zoukankan      html  css  js  c++  java
  • PostgreSQL高可用之Pgpool-II的Health Check参数详解(健康检测)

    列举了PostgreSQL集群高可用方案pgpool-II关于健康检测的相关配置项

    pgpool-II

    Pgpool-II是位于PostgreSQL服务器和 PostgreSQL数据库客户端之间的代理软件,

    架构图如下:

     健康检测常用参数

    health_check_period = 5
                                                # Health check period
                                                # Disabled (0) by default
    health_check_timeout = 30
                                                # Health check timeout
                                                # 0 means no timeout
    health_check_user = 'pgpool'
    health_check_password = ''
    
    health_check_max_retries = 3
    health_check_retry_delay = 5

    health_check_period (integer)

    指定运行状况检查之间的间隔(以秒为单位)。默认值为0,表示健康检查已禁用。

    health_check_timeout (integer)

    指定超时(以秒为单位),如果TCP连接在此时间内未成功,则放弃连接到后端 PostgreSQL。

    此参数用于防止在拔下网络电缆时长时间等待健康检查。默认值为20。将其设置为0,将禁用超时(等待直到TCP / IP超时)。

    health_check_user (string)

    指定执行运行状况检查的PostgreSQL用户名。同一用户必须存在于所有PostgreSQL后端中。否则,运行状况检查将导致错误。

    health_check_password (string)

    指定在health_check_user中配置以执行运行状况检查的PostgreSQL用户名 的密码。在所有PostgreSQL后端中,用户名和密码必须相同。否则,运行状况检查将导致错误。

    如果health_check_password留空Pgpool-II 将首先尝试获取密码health_check_user从 pool_passwd使用空密码之前的文件。

    health_check_database (string)

    指定要执行运行状况检查的PostgreSQL数据库名称。缺省值为(空),它将首先尝试“ postgres” 数据库,然后尝试“ template1”数据库,直到成功。

    health_check_max_retries (integer)

    指定在运行状况检查失败时放弃并启动故障转移之前要进行的最大重试次数,默认值为0,表示不重试。

    health_check_retry_delay (integer)

    指定两次失败的健康检查重试之间的睡眠时间(以秒为单位)(除非health_check_max_retries > 0,否则不使用)。如果为0,则立即重试而不会延迟。

    connect_timeout (integer)

    指定放弃使用connect()系统调用连接到后端之前的时间(以毫秒为单位)。默认值为10000毫秒(10秒)。不稳定的网络用户可能希望增加该值,0表示没有超时。

  • 相关阅读:
    bzoj 1914: [Usaco2010 OPen]Triangle Counting 数三角形【叉积+极角排序+瞎搞】
    poj 1286 Necklace of Beads【polya定理+burnside引理】
    poj 2154 Color【polya定理+欧拉函数】
    poj 2409 Let it Bead【polya定理+burnside引理】
    bzoj 3534: [Sdoi2014]重建【矩阵树定理】
    bzoj 1774: [Usaco2009 Dec]Toll 过路费【排序+Floyd】
    bzoj 4596: [Shoi2016]黑暗前的幻想乡【容斥原理+矩阵树定理】
    bzoj 4031: [HEOI2015]小Z的房间【矩阵树定理】
    poj Find a multiple【鸽巢原理】
    bzoj Strange Way to Express Integers【excrt】
  • 原文地址:https://www.cnblogs.com/mingfan/p/14106345.html
Copyright © 2011-2022 走看看