What factors affect the maximum number of TCP connections established between the client and Nginx?

Asked 2 years ago, Updated 2 years ago, 150 views

I think these factors affect the maximum number of TCP connections that could be established simultaneously.

  • Network Bandwidth and NIC Speed
  • SYN queue and accept queue length
  • Maximum number of open fd (RLIMIT_NOFILE)
  • Install Nginx, worker_connections, worker_cpu_affinity, worker_processes...
  • Memory

Could you tell me if the CPU core count is also an important factor?

The more cores you have, the more network interrupts you can handle at the same time.

nginx network tcp

2022-09-30 16:38

1 Answers

As for TCP/IP processing itself, if the OS or TCP/IP stack considers multiprocessors, the number of cores can be an important factor, and if you do not consider multiprocessors, no matter how many cores you have.

Even if only one core is used to process TCP/IP itself, many cores can result in more connections because servers can receive requests, generate responses, and respond in parallel.On the other hand, if the application side is weak, no matter how much the lower layer is, it will not perform at all.

In other words, there is no point in just looking at a single element, and you need to consider the whole thing.


2022-09-30 16:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.