You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE DATABASE IF NOT EXISTS gaea_dba_check;
CREATE TABLE IF NOT EXISTS gaea_dba_check.heartbeat (
id INT UNSIGNED NOT NULL,
check_timestamp BIGINT UNSIGNED NOT NULL,
unique key(id)
) engine=InnoDB
健康检查配置
创建一个用来健康检查的表, gaea定时访问master, 更新检查时间, 并从slave读取检查时间, 如果检查时间和当前时间的差值超出unhealthy_threshold, 判定slave短暂不可用, 请求将直接转移到其他slave或master.
使用heartbeat模式需要先初始化库表.
查询slave状态
SHOW SLAVE STATUS
, 获取该slice的mysql主从同步延迟时间Seconds_Behind_Master
, 跟unhealthy_threshold比较, 超出阈值, 判定slave短暂不可用, 请求将直接转移到其他slave或master.The text was updated successfully, but these errors were encountered: