ai_protocol_manager: support upstream HTTP filter chains#46385
Draft
botengyao wants to merge 1 commit into
Draft
ai_protocol_manager: support upstream HTTP filter chains#46385botengyao wants to merge 1 commit into
botengyao wants to merge 1 commit into
Conversation
Register the filter as a dual filter (DualFactoryBase) so it can run in a cluster's upstream HTTP filter chain as well as the downstream chain. Also fan upstream-request back-pressure out to addUpstreamWatermarkCallbacks subscribers in the upstream filter manager, mirroring the connection manager's behavior from envoyproxy#46020, so the filter's replay stays paced when it runs upstream. Signed-off-by: Boteng Yao <botengyao@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
Register the AI Protocol Manager filter as a dual filter so it can run in a cluster's upstream HTTP filter chain as well as the downstream chain, and fan upstream-request back-pressure out to addUpstreamWatermarkCallbacks subscribers in the upstream filter manager (mirroring the connection manager's behavior from #46020) so the filter's replay stays paced when running upstream.
Additional Description:
Without the upstream_request.cc fan-out the subscriber list never fired in upstream chains, so replay of a large payload would buffer unboundedly in the upstream connection. Docs note the upstream caveats: no per-upgrade-type chain selection upstream, and upstream local replies bypass router retry/hedging arbitration.
This PR was generated with AI assistance. I have read and understand the code.
Risk Level: Medium — new watermark fan-out in UpstreamRequestFilterManagerCallbacks; dual registration is additive.
Testing: unit tests for the dual factory and the watermark fan-out; integration tests run every scenario with the filter in both chains across protocol combinations.
Docs Changes: ai_protocol_manager_filter.rst — upstream configuration pointer and caveats.
Release Notes: n/a (work-in-progress extension, consistent with #45899/#46020).
Platform Specific Features: n/a