fix(envoy-client): bound the shared WebSocket writer queue
Open
@MasterPtato is already working on this.
Since Aug 13, 2026.
- Dominant language
- Rust
- Stars
- 6.1k
- Forks
- 250
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 96
Description
Problem
The native and WASM envoy-client transports feed the single actor-to-engine WebSocket writer through an unbounded mpsc channel. If producers outpace the socket, queued protocol messages can grow without bound.
This is a shared transport issue, not specific to SSE. The queue carries HTTP request/response chunks alongside WebSocket traffic, events, SQLite, and other envoy messages, so an SSE-only limit would leave the generic failure mode in place.
Desired behavior
- Bound queued writer memory across all message types.
- Apply backpressure or fail fast without blocking an actor's serialized event loop.
- Preserve control-message progress and disconnect/reconnect semantics.
- Define fair accounting for differently sized messages; a message-count-only bound is insufficient.
- Add saturation tests for native and WASM transports, including HTTP streaming, WebSockets, events, and SQLite.
- Add queue-depth/queued-byte and overload metrics.
Relevant code
engine/sdks/rust/envoy-client/src/connection/native.rsengine/sdks/rust/envoy-client/src/connection/wasm.rsengine/sdks/rust/envoy-client/src/connection/mod.rs
Discovered while reviewing the HTTP/SSE streaming change.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.