Skip to content

listener: switch reuse_port default to true - #15818

Closed
mattklein123 wants to merge 2 commits into
mainfrom
reuse_port_enabled
Closed

mattklein123 wants to merge 2 commits into
mainfrom
reuse_port_enabled

Conversation

@mattklein123

Copy link
Copy Markdown
Member
  1. Deprecate existing reuse_port field
  2. Add new enable_reuse_port field which uses a WKT
  3. Make the new default hot restart aware so the default is
    not changed during hot restart.
  4. Allow the default to be reverted using the
    "envoy.reloadable_features.listener_reuse_port_default_enabled"
    feature flag.

Fixes #15794

Risk Level: Medium, scary stuff involving hot restart
Testing: New and existing tests. It was hard to get the tests to pass which gives me more confidence.
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A

1) Deprecate existing reuse_port field
2) Add new enable_reuse_port field which uses a WKT
3) Make the new default hot restart aware so the default is
   not changed during hot restart.
4) Allow the default to be reverted using the
   "envoy.reloadable_features.listener_reuse_port_default_enabled"
   feature flag.

Fixes #15794

Signed-off-by: Matt Klein <[email protected]>
@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #15818 was opened by mattklein123.

see: more, trace.

@mattklein123 mattklein123 assigned lambdai, ggreenway and htuch and unassigned htuch Apr 1, 2021
Signed-off-by: Matt Klein <[email protected]>

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm api

LGTM on API and runtime aspects. Will defer to other reviewers on hot restart aspect.

@repokitteh-read-only repokitteh-read-only Bot removed the api label Apr 2, 2021
@mattklein123

Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15818 (comment) was created by @mattklein123.

see: more, trace.

@mattklein123

Copy link
Copy Markdown
Member Author

@ggreenway points out that SO_REUSEPORT is still broken for hot restart even in latest kernels because connections can get dropped between accept() and close(). I will take another look at this and think of different solutions including possibly passing across all of the sockets from the old worker and using them for the new workers (we had discussed doing this anyway to catch socket creation issues on the main thread).

/wait

@mattklein123

Copy link
Copy Markdown
Member Author

Closing this. I will reopen when I revisit.

@mattklein123
mattklein123 deleted the reuse_port_enabled branch June 2, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stalebot Disables stalebot from closing an issue waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listener: switch default for SO_REUSEPORT to true

4 participants