生产环境下mycat高可用方案mycat+keepalive
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了生产环境下mycat高可用方案mycat+keepalive相关的知识,希望对你有一定的参考价值。
#主master配置如下
cat /etc/keepalived/keepalived.conf
global_defs {
notification_email {
}
#notification_email_from [email protected]
#smtp_server 10.168.0.48
#smtp_connect_timeout 10
router_id nginx
}
vrrp_script chk_haproxy {
script "/etc/keepalived/chk_haproxy.sh"
interval 5
weight 2
}
vrrp_instance ha_71 {
state MASTER
interface eth0
virtual_router_id 71
priority 150
advert_int 5
authentication {
auth_type PASS
auth_pass ha8888
}
track_script {
chk_haproxy
}
virtual_ipaddress {
192.168.5.70/24 dev eth0 label eth0:1
}
}
}
#salve配置如下
cat /etc/keepalived/keepalived.conf
global_defs {
notification_email {
}
#notification_email_from [email protected]
#smtp_server 10.168.0.48
#smtp_connect_timeout 10
router_id nginx
}
vrrp_script chk_haproxy {
script "/etc/keepalived/chk_haproxy.sh"
interval 5
weight 2
}
vrrp_instance ha_71 {
state BACKUP
interface eth0
virtual_router_id 71
priority 100
advert_int 5
authentication {
auth_type PASS
auth_pass ha8888
}
track_script {
chk_haproxy
}
virtual_ipaddress {
192.168.5.70/24 dev eth0 label eth0:1
}
}
}
以上是关于生产环境下mycat高可用方案mycat+keepalive的主要内容,如果未能解决你的问题,请参考以下文章