Skip to content

generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible#24220

Merged
wbpcode merged 4 commits intoenvoyproxy:mainfrom
wbpcode:dev-generic-proxy-drain-support
Dec 2, 2022
Merged

generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible#24220
wbpcode merged 4 commits intoenvoyproxy:mainfrom
wbpcode:dev-generic-proxy-drain-support

Conversation

@wbpcode
Copy link
Copy Markdown
Member

@wbpcode wbpcode commented Nov 28, 2022

Commit Message: generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible
Additional Description:

Drain support for generic proxy. To close #24186.

Risk Level: Low. Contrib update.
Testing: unit.
Docs Changes: n/a.
Release Notes: added.
Platform Specific Features: n/a.

wbpcode added 2 commits November 28, 2022 01:48
… closes on connections when possible

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
wbpcode added 2 commits November 28, 2022 02:25
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
}

// Default implementation for connection draining.
void Filter::onDrainCloseAndNoActiveStreams() {
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.

a question, is this place for each protocol to implement the graceful close? it seems like it required each protocol has a custom filter.

Copy link
Copy Markdown
Member Author

@wbpcode wbpcode Dec 1, 2022

Choose a reason for hiding this comment

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

It's only a place for the protocol who wants more flexible drain policy to implement its own drain policy.

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.

emm... I thought this should be handled by each stream.

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.

discuss offline with @wbpcode, the stream should check the drainDecision() and then implement the graceful close. For the connection, this is the place to do a graceful close if the protocol needs it.

Copy link
Copy Markdown
Member

@soulxu soulxu left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Dec 1, 2022

/assign-from @envoyproxy/senior-maintainers A LGTM is necessary for this contrib update.

@repokitteh-read-only
Copy link
Copy Markdown

@envoyproxy/senior-maintainers assignee is @zuercher
A assignee is @None
LGTM assignee is @None
is assignee is @None
necessary assignee is @None
for assignee is @None
this assignee is @None
contrib assignee is @None
update. assignee is @None

🐱

Caused by: a #24220 (comment) was created by @wbpcode.

see: more, trace.

@wbpcode wbpcode merged commit efa1e88 into envoyproxy:main Dec 2, 2022
jpsim added a commit to alyssawilk/envoy that referenced this pull request Dec 2, 2022
* origin/main:
  Start slow start window on first successful HC, make slow start re-enterable (envoyproxy#23946)
  contrib-sipproxy: rework sipproxy stats (envoyproxy#24165)
  build(deps): bump github/codeql-action from 2.1.32 to 2.1.35 (envoyproxy#24292)
  build(deps): bump node from `c59fb39` to `80844b6` in /examples/ext_authz/auth/http-service (envoyproxy#24274)
  build(deps): bump actions/upload-artifact from 2 to 3 (envoyproxy#24121)
  build(deps): bump mysql from `96439dd` to `66efaaa` in /examples/mysql (envoyproxy#24273)
  build(deps): bump grpcio from 1.50.0 to 1.51.1 in /examples/grpc-bridge/client (envoyproxy#24272)
  Allow mobile/library/common/jni/ to be built on non-Android platforms. (envoyproxy#24299)
  generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible (envoyproxy#24220)
  Reduce Route/VirtualHost memory utilization by avoiding RateLimitPolicy instances when not needed (envoyproxy#24243)
  Reduce VirtualHost memory utilization by avoiding CatchAllVirtualCluster when not needed (envoyproxy#24182)
  Fix mobile/tools/check_format.sh to re-apply envoyproxy#2698 (envoyproxy#24300)
  upstream: don't require `source_address` in `upstream_bind_config` (envoyproxy#24250)
  Quiche roll 20221201150327 (envoyproxy#24290)

Signed-off-by: JP Simard <jp@jpsim.com>
jpsim added a commit that referenced this pull request Dec 2, 2022
…/docs/sphinx-5.3.0

* origin/main: (50 commits)
  ci: Bump mobile build images (#24317)
  ci: update llvm on bazel CI (#24296)
  ci: Fix flaky coverage limit (#24320)
  ci: Fix change detection (part 2) (#24264)
  Start slow start window on first successful HC, make slow start re-enterable (#23946)
  contrib-sipproxy: rework sipproxy stats (#24165)
  build(deps): bump github/codeql-action from 2.1.32 to 2.1.35 (#24292)
  build(deps): bump node from `c59fb39` to `80844b6` in /examples/ext_authz/auth/http-service (#24274)
  build(deps): bump actions/upload-artifact from 2 to 3 (#24121)
  build(deps): bump mysql from `96439dd` to `66efaaa` in /examples/mysql (#24273)
  build(deps): bump grpcio from 1.50.0 to 1.51.1 in /examples/grpc-bridge/client (#24272)
  Allow mobile/library/common/jni/ to be built on non-Android platforms. (#24299)
  generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible (#24220)
  Reduce Route/VirtualHost memory utilization by avoiding RateLimitPolicy instances when not needed (#24243)
  Reduce VirtualHost memory utilization by avoiding CatchAllVirtualCluster when not needed (#24182)
  Fix mobile/tools/check_format.sh to re-apply #2698 (#24300)
  upstream: don't require `source_address` in `upstream_bind_config` (#24250)
  Quiche roll 20221201150327 (#24290)
  Cleanup threading/ownership semantics of PlatformBridgeCertValidator (#2713)
  Add unit tests of the PlatformBridgeCertValidator (#2704)
  ...

Signed-off-by: JP Simard <jp@jpsim.com>
jpsim added a commit that referenced this pull request Dec 2, 2022
…/docs/pygments-2.13.0

* origin/main: (25 commits)
  ci: Bump mobile build images (#24317)
  ci: update llvm on bazel CI (#24296)
  ci: Fix flaky coverage limit (#24320)
  ci: Fix change detection (part 2) (#24264)
  Start slow start window on first successful HC, make slow start re-enterable (#23946)
  contrib-sipproxy: rework sipproxy stats (#24165)
  build(deps): bump github/codeql-action from 2.1.32 to 2.1.35 (#24292)
  build(deps): bump node from `c59fb39` to `80844b6` in /examples/ext_authz/auth/http-service (#24274)
  build(deps): bump actions/upload-artifact from 2 to 3 (#24121)
  build(deps): bump mysql from `96439dd` to `66efaaa` in /examples/mysql (#24273)
  build(deps): bump grpcio from 1.50.0 to 1.51.1 in /examples/grpc-bridge/client (#24272)
  Allow mobile/library/common/jni/ to be built on non-Android platforms. (#24299)
  generic proxy: added drain support to generic proxy to doing graceful closes on connections when possible (#24220)
  Reduce Route/VirtualHost memory utilization by avoiding RateLimitPolicy instances when not needed (#24243)
  Reduce VirtualHost memory utilization by avoiding CatchAllVirtualCluster when not needed (#24182)
  Fix mobile/tools/check_format.sh to re-apply #2698 (#24300)
  upstream: don't require `source_address` in `upstream_bind_config` (#24250)
  Quiche roll 20221201150327 (#24290)
  Cleanup threading/ownership semantics of PlatformBridgeCertValidator (#2713)
  Add unit tests of the PlatformBridgeCertValidator (#2704)
  ...

Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generic proxy: drain support

3 participants