Haproxy Load Balancer Comparison

Source: Internet
Author: User
Tags haproxy

There are several ways to compare haproxy load balancing, and there are some questions to welcome the discussion.

First, Haproxy load Balancing Implementation mode:

1, simple polling, balance roundrobin;
2. Ip,balance source according to the request;
3, according to the requested uri,balance URI;
4, according to the parameters in the request URL, balance Url_param;
5, according to the connection type, balance leastconn;
Second, detailed description:

1, simple polling, balance roundrobin;
The request is assigned according to the weights (weight) value, and weights defaults to 1.
Advantages: Simple implementation, flow distribution by weight.
Cons: Not flexible enough.


2. Ip,balance source according to the request;
This equalization method is to match the IP source with the hashed operation.
Advantage: You can keep a user session (the same IP user will access the same server as much as possible).
Disadvantage: It is possible to cause a single point bottleneck (weights invalid).


3, according to the requested uri,balance URI;
The hashed operation is matched according to the URL requested by the client.
Advantage: You can increase the hit rate of the cache (the same URL will be assigned to the same server as far as possible);
Disadvantage: It is possible to cause a single point bottleneck (weights invalid).


4, according to the parameters in the request URL, balance Url_param.
The hashed operation is matched according to the specified URL parameter.
Pros: More flexible, can increase the hit rate of the cache (the same specified parameters will be allocated to the same server as
Service);
Disadvantage: It is possible to cause a single point bottleneck (weights invalid).


5, according to the connection type, balance leastconn;
Match according to the connection type.
Advantages: more suitable for long-session connection, such as LDAP, SQL, TSE, etc;
Cons: connections that are not suitable for short sessions, such as HTTP.


This article is from the "technical Discrimination" blog, please be sure to keep this source http://emg2012.blog.51cto.com/3705315/1632900

Haproxy Load Balancer Comparison

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.