Keepalived+haproxy for high-availability load balancing

Source: Internet
Author: User
Tags haproxy

General Overview:

keepalived is a software similar to the Layer3, 4 & 5 switch, which is what we normally call the 3rd, 4th, and 5th layers of exchange. The role of keepalived is to detect the state of the Web server, if a Web server freezes, or a work failure occurs, keepalived detects and rejects the failed Web server from the system. When the Web server is working properly, Keepalived automatically joins the Web server to the server farm, all of which are automatically completed without human intervention and need to be done manually to repair the failed Web server

HAProxy provides high availability, load balancing, and proxies based on TCP and HTTP applications, supporting virtual hosting, which is a free, fast, and reliable solution. Haproxy is especially useful for Web sites that are heavily loaded, and often require session-hold or seven-tier processing. The haproxy runs on the current hardware and can support tens of thousands of concurrent connections. and its operating mode makes it easy and safe to integrate into your current architecture, while protecting your Web server from being exposed to the web.

Here I use Haproxy to load multiple Redis servers and then monitor the haproxy with keepalived:

(primary) Server a:10.10.51.231

(from) Server b:10.10.51.232

vip:10.10.51.230

Keepalived Monitor A, B on the haproxy, the use of keepalived VIP drift technology, if a, b Haprox are working properly, VIP and High priority server (master server) binding, when the primary server when the drop, then the slave server bound, The VIP is exposed to the external access of the ip;haproxy using keepalived production of the VIP to the multi-redis (from) Read load, when a redis when off, then remove it, reply to join the cluster.

Keepalived+haproxy for high-availability load balancing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.