Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: add UV_TCP_REUSEPORT for tcp #55408

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

theanarkh
Copy link
Contributor

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: libuv/libuv#4407

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

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Oct 16, 2024
@theanarkh theanarkh force-pushed the add_reuseport_for_tcp branch 2 times, most recently from e6cdae7 to 3cd2331 Compare October 16, 2024 18:03
Copy link

codecov bot commented Oct 16, 2024

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 ⚠️
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%) ⬆️
src/tcp_wrap.cc 80.32% <66.66%> (+0.32%) ⬆️

... and 116 files with indirect coverage changes

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@nodejs-github-bot

This comment was marked as outdated.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing!
LGTM!

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@nodejs-github-bot

This comment was marked as outdated.

@mcollina mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2024
@theanarkh theanarkh removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2024
@addaleax
Copy link
Member

Title should be net: add UV_TCP_REUSEPORT, right?

@theanarkh theanarkh changed the title lib: add UV_TCP_REUSEPORT for tcp net: add UV_TCP_REUSEPORT for tcp Oct 17, 2024
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@nodejs-github-bot

This comment was marked as outdated.

doc/api/net.md Outdated Show resolved Hide resolved
test/common/net.js Outdated Show resolved Hide resolved
test/parallel/test-child-process-net-reuseport.js Outdated Show resolved Hide resolved
test/common/net.js Outdated Show resolved Hide resolved
test/common/net.js Outdated Show resolved Hide resolved
test/parallel/test-child-process-net-reuseport.js Outdated Show resolved Hide resolved
test/parallel/test-child-process-net-reuseport.js Outdated Show resolved Hide resolved
test/parallel/test-cluster-net-reuseport.js Outdated Show resolved Hide resolved
test/parallel/test-net-reuseport.js Outdated Show resolved Hide resolved
test/parallel/test-net-reuseport.js Show resolved Hide resolved
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@nodejs-github-bot

This comment was marked as outdated.

doc/api/net.md Outdated Show resolved Hide resolved
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@nodejs-github-bot

This comment was marked as outdated.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still lgtm

@nodejs-github-bot

This comment was marked as outdated.

@theanarkh theanarkh added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 19, 2024
test/common/net.js Outdated Show resolved Hide resolved
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 20, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Oct 20, 2024

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 21, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 21, 2024
@nodejs-github-bot nodejs-github-bot merged commit 7bc3e16 into nodejs:main Oct 21, 2024
60 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 7bc3e16

@lpinca lpinca added the semver-minor PRs that contain new features and should be released in the next minor version. label Oct 22, 2024
aduh95 pushed a commit that referenced this pull request Oct 23, 2024
PR-URL: #55408
Refs: libuv/libuv#4407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants