node
node copied to clipboard
net: add UV_TCP_REUSEPORT for tcp
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), orvcbuild test(Windows) passes - [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows commit guidelines
Review requested:
- [ ] @nodejs/net
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: |
CI: https://ci.nodejs.org/job/node-test-pull-request/63150/
CI: https://ci.nodejs.org/job/node-test-pull-request/63156/
Title should be net: add UV_TCP_REUSEPORT, right?
CI: https://ci.nodejs.org/job/node-test-pull-request/63170/
CI: https://ci.nodejs.org/job/node-test-pull-request/63182/
CI: https://ci.nodejs.org/job/node-test-pull-request/63189/
CI: https://ci.nodejs.org/job/node-test-pull-request/63197/
CI: https://ci.nodejs.org/job/node-test-pull-request/63212/
CI: https://ci.nodejs.org/job/node-test-pull-request/63214/ 💚
Landed in 7bc3e16da1eac8f207affa87fbfb1b6955b574c5