1、check:对当前server做健康状态检测,只用于四层检测 注意:httpchk,“smtpchk”, “mysql-check”, “pgsql-check” and “ssl-hello-chk” 用于定义应用层检测方法 addr :检测时使用的IP地址 port :针对此端口进行检测 inter <delay>:检测之间的时间间隔,默认为2000ms rise <count>:连续多少次检测结果为“...
default-server port 80 server web1 192.168.80.121 check server web2 192.168.80.122:8080 port 8080 check //上面的三行设置web1使用80端口检查,web2是使用8080端口检查 agent-check、agent-port、agent-inter agent-send backup default-server:不支持 使用一台服务器作为备份服务器。举例说明 option httpchk GE...
port<port>:健康状态检测时使用的端口. 注意:默认为传输层检测,即探测端口是否能响应;需要执行应用层检测,则需要httpchk, smtpchk, mysql-check, pgsql-check, ssl-hello-chk; cookie<value>: 为当前server指定其cookie值,此值会在收到请求报文时进行检测,其功能在于实现基于cookie会话保持. disabled:将些server...
backup:设定当前server为备用服务器 20 健康状态检测 check:对当前server做健康状态检测,只用于四层检测 注意:httpchk, “smtpchk”, “mysql-check”, “pgsql-check” and “sslhello-chk” 用于定义应用层检测方法 addr :检测时使用的IP地址 port :针对此端口进行检测 inter<delay>:连续两次检测之间的时...
check:对当前server做健康状态检测,只用于四层检测 注意: httpchk, “smtpchk”, “mysql-check”, “pgsql-check” and “sslhello-chk” 用于定义应用层检测方法 addr :检测时使用的IP地址(检测的不一定是vip) port :针对此端口进行检测 inter <delay>:连续两次检测之间的时间间隔,默认单位为毫秒,默认为2000...
option pgsql-check user haproxy balance roundrobin server postgresql_01 192.168.199.201:5430 weight 1 check inter 5s rise 2 fall 3 server postgresql_02 192.168.199.201:5431 weight 1 check inter 5s rise 2 fall 3 listen admin-stats mode http ...
注意:option后面加httpchk,smtpchk, mysql-check, pgsql-check,ssl-hello-chk方法,可用于实现更多应用层检测功能。 示例: 1 2 3 4 •frontend WEB_PORT •bind :80,:8080 •bind 192.168.7.102:10080,192.168.7.102:10043 •use_backend backend_name ...
Is the HAProxy’s built-in pgsql-check completely useless as it cannot distinguish between a Primary and a hot-standby (standby that accepts reads) in an HA setup? Is there a way to tweak pgsql-check so that it can distinguish between a Primary and Hot-standby? This blog post discusses...
默认为传输层检测,即探测端口是否能响应;需要执行应用层检测,则需要httpchk, smtpchk, mysql-check, pgsql-check, ssl-hello-chk; ◆cookie <value>: 为当前server指定其cookie值,此值会在收到请求报文时进行检测,其功能在于实现基于cookie会话保持;
ERR_FILE="/tmp/pgsqlchk.err" # We perform a simple query that should return a few results VALUE=`$PGBIN/psql -qt -h localhost -U pg12 -p 5432 -c "select pg_is_in_recovery()" 2> /dev/null` # Check the output. If it is not empty then everything is fine and we return som...