HAProxy performance in high concurrency

Source: Internet
Author: User
Tags haproxy

HAProxy performance in high concurrency

After the xunqi message gateway server is migrated from Beijing to the Wuxi data center, after a text message is sent, only about 60% of the text message status reports are received.

After understanding the business logic, you can view the statistical status on the stats page of haproxy as follows:

In the red circle, we can see that the maximum number of sessions has reached 4096, while maxconn in my haproxy. cfg file is 2000. Of course, the number of connections is not enough. In fact, the back-end SMS Server Always reports an error, and the front-end Page Server also reports an error, but you have not communicated on this issue. It took nearly a month to solve the problem.

So we changed it to 5000. Re-load the configuration and the number of connections went up. However, the reset connections in the resp continue to rise. Why?

Use ulimit-n to check whether the default value of open files is 1024. Change it to 50000. Observe for a while and find that although the resp growth speed is reduced, there is still. Then adjust the parameters:

Net. ipv4.tcp _ fin_timeout = 5

Net. ipv4.tcp _ tw_reuse = 1

Net. ipv4.tcp _ tw_recycle = 1

Net. ipv4.ip _ local_port_range = 10240 61000

After the modification is complete, observe for a while and find that it is finally quiet. Resp is always kept as 0.

Of course, this intermediate process took two days to solve.

Haproxy + Keepalived build Weblogic high-availability server Load balancer Cluster

Keepalived + HAProxy configure high-availability Load Balancing

Haproxy + Keepalived + Apache configuration notes in CentOS 6.3

Haproxy + KeepAlived WEB Cluster on CentOS 6

Haproxy + Keepalived build high-availability Load Balancing

Configure an HTTP Load balancer using HAProxy

For details about HAproxy, click here
HAproxy: click here

This article permanently updates the link address:

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.