node icon indicating copy to clipboard operation
node copied to clipboard

net: add UV_TCP_REUSEPORT for tcp

Open theanarkh opened this issue 1 year ago • 9 comments

SO_REUSEPORT allows users bind a port to multiple sockets, and incoming connections are distributed by OS across the listener sockets. It will improve the performance of server.

Refs: https://github.com/libuv/libuv/pull/4407

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines

theanarkh avatar Oct 16 '24 17:10 theanarkh

Review requested:

  • [ ] @nodejs/net

nodejs-github-bot avatar Oct 16 '24 17:10 nodejs-github-bot

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.41%. Comparing base (7a7c2b3) to head (0b06319). Report is 68 commits behind head on main.

Files with missing lines Patch % Lines
src/tcp_wrap.cc 66.66% 0 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55408      +/-   ##
==========================================
- Coverage   88.41%   88.41%   -0.01%     
==========================================
  Files         652      653       +1     
  Lines      186878   187527     +649     
  Branches    36061    36105      +44     
==========================================
+ Hits       165236   165804     +568     
- Misses      14895    14956      +61     
- Partials     6747     6767      +20     
Files with missing lines Coverage Δ
lib/net.js 95.12% <100.00%> (+0.01%) :arrow_up:
src/tcp_wrap.cc 80.32% <66.66%> (+0.32%) :arrow_up:

... and 116 files with indirect coverage changes

codecov[bot] avatar Oct 16 '24 19:10 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63150/

nodejs-github-bot avatar Oct 17 '24 02:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63156/

nodejs-github-bot avatar Oct 17 '24 07:10 nodejs-github-bot

Title should be net: add UV_TCP_REUSEPORT, right?

addaleax avatar Oct 17 '24 18:10 addaleax

CI: https://ci.nodejs.org/job/node-test-pull-request/63170/

nodejs-github-bot avatar Oct 18 '24 04:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63182/

nodejs-github-bot avatar Oct 18 '24 14:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63189/

nodejs-github-bot avatar Oct 18 '24 17:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63197/

nodejs-github-bot avatar Oct 19 '24 02:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63212/

nodejs-github-bot avatar Oct 20 '24 10:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63214/ 💚

nodejs-github-bot avatar Oct 20 '24 13:10 nodejs-github-bot

Landed in 7bc3e16da1eac8f207affa87fbfb1b6955b574c5

nodejs-github-bot avatar Oct 21 '24 13:10 nodejs-github-bot