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

Add filter state receive_before_connect to tcp_proxy #36581

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Add more tests and emit metric on early buffer

5c171de
Select commit
Loading
Failed to load commit list.
Draft

Add filter state receive_before_connect to tcp_proxy #36581

Add more tests and emit metric on early buffer
5c171de
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Perf skipped Oct 14, 2024 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/36581/main@5c171de)

akshita31 @akshita31 5c171de #36581 merge main@93d05d5

Add filter state receive_before_connect to tcp_proxy

Commit Message:
This PR picks up the work done in #25804.

  1. It adds a receive_before_connect filter state which can be read by TCP_PROXY and if set TCP_PROXY will not disable downstream reads until the upstream connection is established. This can hence be used by filters before TCP_PROXY to set the filter state in initializeReadFilterCallbacks, and then StopIteration in onNewConnection and onData, until they have read the required amount of data before upstream connection establishment.
  2. Based on feedback in #25804 , this PR adds a flow control to prevent early_data_buffer from overflowing, by disabling downstream reads on early data until the upstream connection establishment is finished.
  3. Adds integration and unit tests to cover the newly added functionality.

Additional Description:
Risk Level: Low
Testing: Added integration and unit tests
Docs Changes: Done
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Environment

Request variables

Key Value
ref 23f512a
sha 5c171de
pr 36581
base-sha 93d05d5
actor akshita31 @akshita31
message Add filter state receive_before_connect to tcp_proxy...
started 1728937114.584562
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c
mobile envoyproxy/envoy-build-ubuntu:mobile-f94a38f62220a2b017878b790b6ea98a0f6c5f9c
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 32
patch 0
dev true