redis双主+keeplived,其中keeplived配置
时间: 2023-07-01 09:12:52 浏览: 84
redis+Keepalived实现Redis高可用性
以下是一个基本的Keeplived配置示例,用于Redis双主架构:
```
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 101
advert_int 1
authentication {
auth_type PASS
auth_pass password
}
virtual_ipaddress {
192.168.1.100
}
}
virtual_server 192.168.1.100 6379 {
delay_loop 6
lb_algo rr
lb_kind NAT
persistence_timeout 50
protocol TCP
real_server 192.168.1.101 6379 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 6379
}
}
real_server 192.
阅读全文