reverse_tunnels: add gRPC streaming client for reverse tunnel reporting #44344
CI (Envoy) / Mobile/Perf
skipped
Apr 9, 2026 in 0s
Check was skipped
This check was not triggered in this CI run
Details
Request (pr/44344/main@d568b1f)
@aakugan
d568b1f #44344
merge main@94828ca
reverse_tunnels: add gRPC streaming client for reverse tunnel reporting
BUILDS on #44342. Please review that one first.
INCREMENTAL DIFFSCommit Message
Add gRPC streaming client for reverse tunnel reporting
Additional Description
Adds a bidirectional gRPC streaming client that pushes reverse tunnel connection state to a remote ReverseTunnelReportingService. This is a client implementation for the EventReporter introduced in the previous PR.
Protocol:
- On connect (and every reconnect) the client does a full state push of all known connections obtained from the reporter.
- Between connects the client sends incremental diffs on a periodic send timer. Empty messages serve as heartbeats.
- Each request carries an incrementing nonce. The server ACKs by echoing the nonce; a NACK carries an error_detail and triggers disconnect.
- If too many nonces remain unacked the client disconnects and reconnects, treating the server as dead or stuck.
- The server may adjust the send interval via report_interval in its ACK; the client floors it at 25ms to prevent tight loops.
Key components:
GrpcClient: implementsReverseTunnelReporterClientandGrpc::AsyncStreamCallbacks. Manages stream lifecycle, nonce tracking, send/retry timers, and per-cluster stats.GrpcClientFactory: dynamically registered factory resolved by the EventReporter when constructing clients from config.GrpcClientConfig: parsed config struct with defaults (5s send interval, 5s retry, 5 max retries, 1M buffer).Additional considerations:
initialized_guard prevents silent event queuing if cluster lookup or client creation fails during onServerInitialized().- Buffer overflow while disconnected does not re-arm the retry timer.
- Nonce reset on every new stream to avoid stale ACK confusion.
Risk Level: Low
Testing
Unit tests
Environment
Request variables
| Key | Value |
|---|---|
| ref | ac3e56d |
| sha | d568b1f |
| pr | 44344 |
| base-sha | 94828ca |
| actor | |
| message | reverse_tunnels: add gRPC streaming client for reverse tunnel reporting... |
| started | 1775736158.192682 |
| target-branch | main |
| trusted | false |
Build image
Container image/s (as used in this CI run)
| Key | Value |
|---|---|
| default | docker.io/envoyproxy/envoy-build:86873047235e9b8232df989a5999b9bebf9db69c |
| mobile | docker.io/envoyproxy/envoy-build:mobile-86873047235e9b8232df989a5999b9bebf9db69c |
Version
Envoy version (as used in this CI run)
| Key | Value |
|---|---|
| major | 1 |
| minor | 38 |
| patch | 0 |
| dev | true |
Loading