Keepalived principle

Keepalived works

  1. Software

Keepalived software was originally designed for LVS load balancing software designed to manage and monitor the status of each service node of LVS cluster system, and later joined the VRRP can achieve high availability features. Therefore, Keepalived addition to management LVS software, but also can be used as additional services (for example: Nginx, Haproxy, MySQL, etc.) high availability software solutions.

  1. Keepalived using modular design, different modules for different functions;

  2. keepalived there are three main modules, namely core, check and vrrp.

  3. core: core keepalived is responsible for the main process of start-up and maintenance, load the global configuration file parsing, etc.

  4. check: responsible healthchecker (health check), includes a variety of health checks ways, and parsing the corresponding configuration includes LVS
    configuration parsing; IPVS can to the back-end server health check script-based inspection.

  5. vrrp: VRRPD child process, VRRPD child process is to achieve the VRRP

keepalived availability principle

  1. Failover high-availability service transfer between Keepalived Yes, it is through VRRP (Virtual Router Redundancy
    realized Protocol, Virtual Router Redundancy Protocol).

When Keepalived service to work, the master Master node will continue to send to the standby node (multicast mode) heartbeat messages ICMP, to tell the backup Backup node he still alive to see, when the main Master node fails, you can not send a heartbeat message backup nodes will continue to detect the arrival of the heartbeat can not be independent master node, and then calls itself to take over the program, to take over the main master node IP resources and services. When the master node recovery Master, prepared Backup node will release the IP resources and services to take over when the primary node fails itself, and restored to its original standby role.

VRRP Introduction:
VRRP, full name of the Virtual Router Redundancy Protocol, the Chinese called Virtual Router Redundancy Protocol, VRRP is to solve the emergence of
a single point of failure problem of static prostrate Fu, is by means of a VRRP election mechanism to route tasks to a Taiwan VRRP router.

Published 35 original articles · won praise 11 · views 2945

Guess you like

Origin blog.csdn.net/weixin_45697805/article/details/103875720