Hello everyone,
Today I will share with you how to reduce the time for canceling TCP connections in TIME_WAIT state on Windows.
In a large-scale Windows environment, a large number of Transmission Control Protocol (TCP) connections in the TIME_WAIT state exist after Nginx reverse proxy service is adopted. By default, TCP connections in the TIME_WAIT state is canceled in 4 minutes. By default, the dynamical TCP ports ranges from 49152 to 65535. As a result, TCP connections are recycled slowly, which leads to a throughput decrease or access failures (error code: 502). You can modify operating system (OS) kernel parameters to shorten the recycling duration for TCP connections in the TIME_WAIT state and enlarge the dynamical TCP port range. This ensures that OS port resources are available when a large number of clients access the server concurrently.
That is all I want to share with you!