The implementation of the high availability cluster is implemented by the Keepalived software based on the VRRP protocol (virtual Redundant routing protocol);
VRRP protocol:
650) this.width=650; "src=" Https://s1.51cto.com/oss/201711/08/b4acee23372cb40924863caebadb05e1.png "title=" Ka4.png "alt=" B4acee23372cb40924863caebadb05e1.png "/>
Configure Keepalived to enable highly available cluster operations below
First, 2 schedulers (DR1,DR2), 2 RS servers (RS1,RS2) and 1 clients are prepared;
It is important to be aware of the prerequisites for high availability:
1. The time between each node must be synchronized, need to use time server;
2. Each node can communicate with each other through the host name;
3. Ensure that iptables and selinux do not hinder data communication between nodes
4. For security reasons, the root user between each node can communicate with each other based on the key authentication;
• Install the keepalived package on both schedulers
• Write the keepalived master profile/etc/keepalived/keepalived.conf
Mainly write the following
650) this.width=650; "src=" Https://s3.51cto.com/oss/201711/08/b2b920be25640d137afc4af6d3842d01.png "title=" Ka1.png "alt=" B2b920be25640d137afc4af6d3842d01.png "/>650" this.width=650; "src=" https://s4.51cto.com/oss/ 201711/08/5faa644154bd01ba997dddae3730f006.png "title=" Ka2.png "alt=" 5faa644154bd01ba997dddae3730f006.png "/>
It is important to note that keepalived is preemption mode by default
The difference between the configuration files of the two schedulers is in the part of instance 1
DR2 status for backup priority requires less than 100
After confirming the configuration configuration of the build Dr model in RS1 and RS2, the keepalived service for DR1 and DR2 is turned on.
650) this.width=650; "src=" Https://s5.51cto.com/oss/201711/08/d3a467d36b812194296c66518ce78ca3.png "title=" Ka3.png "alt=" D3a467d36b812194296c66518ce78ca3.png "/>
This article is from the "Start from Operation" blog, please be sure to keep this source http://xredm.blog.51cto.com/12445165/1980092
Keepalived for Linux (HA high availability cluster)