I recently encountered such a problem: Proxy server (can be LVS haproxy nginx), here we take Ningx as an example. When performing prxoy cluster proxy, how to judge the connection processing capability of a single server? There is no pressure on the proxy server load bandwidth CPU, the only possible problem is TCP connection problem: Now the number of connections established by a single server is up to 8k, usually 6.5k, and the timeout is up to 2K, usually 1.3K. The random port of the server is opened to 61000.
There should be no direct relationship between the port and the number of established connections. But how does a proxy-type server determine its concurrent processing capabilities?
Please give some guidance from an expert. What is the relationship between this? How to calculate the capacity. Thank you!!
Your question is not easy to answer, because reverse proxy software such as Squid, Haproxy, Nginx, and Varnish can support tens of thousands of HTTP connections at the same time, and the network involves the configuration of the operating system kernel. Different system parameters may The number of supported connections is different. If the parameters are optimized well, the number may increase again.
Generally speaking, the back-end operation time is definitely longer than the front-end response time. If the back-end cannot support large concurrency, it is meaningless to consider the maximum number of concurrent front-end agents. It is best to pass the back-end load to the front-end through the interface and let the front-end allocate priorities.
If you use one server to serve as both proxy and back-end, there is no need to consider this type of issue. Generally, it is considered with multiple servers. After all, there are many cases where the front-end is still running but the back-end is unresponsive.