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