Tens high concurrency load balancing software haproxy

Source: Internet
Author: User
Tags haproxy

1 Load Balancer Product introduction

Hardware-based load balancing devices such as F5,BIG-IP,
Software-based load balancer product Haproxy,lvs,nginx
In these software products, it is divided into the implementation of soft load based on operating system and the implementation of soft load based on third party application.
LVS is a kind of soft load balancing based on Linux operating system, and Haproxy is a soft load balance based on third party implementation.

2 Haproxy Introduction

Haproxy is an open-source, high-performance, load-balancing software based on TCP and HTTP (seventh tier) applications.
Good reliability and stability, comparable to hardware-grade F5
450,000 concurrent connections can be maintained at the same time.
Supports more than 8 load balancing algorithms, and also supports session retention.
Features that support virtual hosts
1.3 Support for reject connection, full transparent proxy and other functions
A powerful Server Status monitoring page provides real-time visibility into the system's operational status.
ACL support

34-layer and seven-layer load balancing differences four-tier load balancers

The so-called four layer is the fourth layer in the iOS model, the four-tier load balancer is also called the four-layer switch, mainly through the analysis of IP layer and TCP/UDP layer
Based on IP and port number load balancing, common Lvs,f5
The main implementation process takes TCP as an example
When the load balancer receives the first SYN request from the client, it chooses one of the best back-end servers through the Set load balancing algorithm
At the same time, the target IP address in the insulation is modified to the back-end server IP, and then forwarded directly to the back-end server such a load balancer is complete.
In this process, a TCP connection occurs when the client connects directly to the server, and the load balancer is just the equivalent of the router's forwarding action.
Load Balancer

Client---------TCP connection----------forward Connection-----Service
Modify header Destination Address modify source address (as required)

Seven-layer Load balancer

The seven-tier load balancer is also called a seven-layer switch, located at the highest application layer of the ISO model, which supports multiple protocols such as HTTP,FTP,SMTP.
Seven-layer load balancing can be used to select back-end servers in conjunction with load balancing algorithms based on message content, so it can also be called a content exchanger
For the web, seven-tier load balancing can not only be based on the ip+ port number to offload, but also according to the website URL, access to the domain name, browser, language, etc. to
Determines the load balancing policy.
The main implementation process takes TCP as an example
Because the load balancer wants to get the contents of the message, it can only establish the connection with the backend server and the client, then receive the message from the client, and then according to
The specific field in the message plus the Load Balancer algorithm set in the load balancer to determine the final choice of internal servers, the seven-tier load balancer is similar to a proxy server throughout the process.

Seven-layer Load balancer
Client----Independent TCP connection----proxy----------stand-alone TCP connection------server
Compared with the above can be seen in the seven-tier mode, the load balancer and the client and the back-end server will establish a TCP connection, and four-tier load balancing mode, only one TCP connection is established.
Therefore, the seven-tier load balancing device requires a higher, seven-layer processing capacity is necessarily lower than the four-layer mode.

Comparison of 4 LVS NGINX Haproxy

Tens high concurrency load balancing software haproxy

Related Article

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.