Skip to content

TCP accept refactoring

Witold Krecicki requested to merge wpk/tcp-accept-refactoring into master

Instead of using bind() and passing the listening socket to the children threads using uv_export/uv_import use one thread that does the accepting, and then passes the connected socket using uv_export/uv_import to a random worker. The previous solution had thundering herd problems (all workers waking up on one connection and trying to accept()), this one avoids this and is simpler. The tcp clients quota is simplified with isc_quota_attach_cb - a callback is issued when the quota is available.

---CHANGES--- Refactoring of TCP accept code to use a single accept() and pass the accepted socket to child threads for processing.

Edited by Witold Krecicki

Merge request reports