读书人

运用Keepalived进行Memcached双机热备

发布时间: 2013-07-01 12:33:04 作者: rapoo

使用Keepalived进行Memcached双机热备
1.节点A
mkdir -p /etc/keepalived/
vi /etc/keepalived/keepalived.conf

# machine to maintain the master role, even when
# a higher priority machine comes back online.
# NOTE: For this to work, the initial state of this
# entry must be BACKUP.
nopreempt

2.在虚拟机中的问题
在虚拟机中不能使用ifdown eth0这种方式来测试,因为我在测试的过程中遇到过ifdown之后,Backup中还是能收到Master的广播包。虚拟机中可以通过kill keepalived进程来测试。
在物理机中也同时不能使用ifdown eth0这种方式来测试。

参考:
http://blog.sina.com.cn/s/blog_5f190fff0101e9ht.html

读书人网 >开源软件

热点推荐