listener: make reuse port the default (#17259)
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. 5) Change listener init so that almost all error handling occurs on the main thread. This a) vastly simplifies error handling and b) makes it so that we pre-create all sockets on the main thread and can use them all during hot restart. 6) Change hot restart to pass reuse port sockets by socket/worker index. This works around a race condition in which a draining listener has a new connection on its accept queue, but it's never accepted by the old process worker. It will be dropped. By passing all sockets (even reuse port sockets) we make sure the accept queue is fully processed. Fixes https://github.com/envoyproxy/envoy/issues/15794 Risk Level: High, scary stuff involving hot restart and listener init Testing: New and existing tests. It was very hard to get the tests to pass which gives me more confidence. Docs Changes: N/A Release Notes: Added Platform Specific Features: N/A Signed-off-by: Matt Klein <mklein@lyft.com> Mirrored from https://github.com/envoyproxy/envoy @ ba474ac375418d5529a30a9510a8ff5f0a5ada9apull/624/head
parent
e12e5ca8cc
commit
940c333e25
2 changed files with 41 additions and 18 deletions
Loading…
Reference in new issue