Recently we have been looking at some high-availability load-balancing schemes, and of course, those hardware devices such as F5 are not playable and inaccessible. Only look at these open source solutions for free.
At present, the use of more than the title mentioned in the two, in fact, LVS and Haproxy are to achieve the role of load balancing, keepalived and heartbeat are to improve the high availability, to avoid single point of failure. So why are they so paired up, and what's the difference?
After some google, the difference is generally understood:
LVS is a packet forwarding via the VRRP protocol, providing a 4-tier load balancer. The feature is high efficiency, as long as your machine card anti-Live is not a problem.
Haproxy can provide 4-layer or 7-layer data forwarding services, the 7-tier benefits can be based on the state of the service and other load.
The above two are only load balanced, but they are obvious single point of failure, so need to use dual-machine software to do hot spare, to ensure high availability. The keepalived can be switched by detecting VRRP packets, making it more suitable for use with LVS. And the heartbeat is more suitable for haproxy collocation. In this way, there are more and more classic load-balanced high availability scenarios for these two applications.
Originally always want to learn the next two programs, learn the configuration of the 4 software, but also feel that can never use it? Or maybe there's a new technology in use. Is that they can use, reverse proxy a class of software enough to use, squid is really no mood to learn. Nginx feel good, good performance is recognized, that is, you can do the reverse proxy load balancing, and through the GEO module to achieve a global (different geographical) load balancing, coupled with simple configuration, is definitely the first choice for individuals, you can consider collocation heartbeat to achieve high availability.
The next learning goal is to simplify the configuration of Nginx Geo and heartbeat.
Lvs+keepalived and Haproxy+heartbeat differences