How Keepalived works

    Keepalived software mainly implements highly available functions through the VRRP protocol.

1) VRRP, the Chinese name is virtual routing redundancy protocol, in order to solve the single point of failure of static routing.

2) VRRP uses IP multicast to achieve communication between highly available pairs.

3) VRRP uses a campaign protocol mechanism to hand over routing tasks to a certain VRRP router.

4) When working, the master node sends packets, and the standby node receives the packets. When the standby node cannot receive the data packets sent by the master node, it starts a takeover program to take over the resources of the master node. There can be multiple standby nodes, which are elected by priority, but generally the Keepalived system is a pair in the operation and maintenance work.

5) VRRP uses an encryption protocol to encrypt data.

    Keepalived high-availability pairs communicate through VRRP. VRRP uses the election mechanism to determine the master and backup. The master has higher priority than the standby. Therefore, the master will get all resources first when working, and the standby node is in a waiting state. When the master hangs up, the standby node will take over the resources of the master node, and then replace the master node to provide external services.

    Between the Keepalived service pairs, only the server that is the master will always send VRRP broadcast packets to tell the standby that it is still alive, and the standby will not preempt the master at this time. Related services will be started to take over resources to ensure business continuity. The fastest takeover speed can be less than 1 second.

   

Guess you like

Origin blog.51cto.com/sky9896/2488944