The performance of haproxy under large concurrency

Source: Internet
Author: User

The news of the message Gateway server moved from Beijing to Wuxi engine room, after the text message issued, SMS status report only received about 60%.

By understanding the business logic, through Haproxy's stats page, you see the following stats:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/C6/wKioL1Yo1teRjTlCAALz6t6UF4g503.jpg "title=" Cd5be99ae0354362a5463a9f801ccb09.jpg "alt=" wkiol1yo1terjtlcaalz6t6uf4g503.jpg "/> In the red circle can see that the highest number of sessions has reached 4096 , and the maxconn in my haproxy.cfg file is 2000. Of course, the number of connections is not enough. In fact, the backend SMS server has been error, the front Page server also error, but we have not communicated on this issue. This problem lasted for almost one months before it was resolved together.

So the decisive change to 5000. Reload the configuration, the number of connections up. However, the RESP part of the reset connection continues to rise. Why is it?

Using Ulimit-n view, found that open files is the default of 1024, decisively modified to 50000, not big. Observing a period of time, it was found that although the rate of RESP growth decreased, there was still. Re-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 completed, observe a period of time and discover that it is finally quiet. Resp has remained at 0.

Of course, the middle process lasted 2 days before it was resolved.



The performance of haproxy under large concurrency

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.