Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay port binding to reduce wait at process start
With the new default behavior of eventlet 0.20 to set SO_REUSEPORT on listening sockets, it becomes easy to have a zero-downtime reload. By binding the listening socket as late as we can, we can reduce the time an incoming connection will stay in queue, waiting for the process to be ready to handle the connection. This commit moves the socket binding after the load of the application. On some benchmarks, it reduced the wait-time for incoming connections from about 1.1s to about 350ms. Change-Id: I045f4c9aa2c07cdc5ed95afd028540f1b3874637
- Loading branch information
Showing
2 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters