SetHttp2Windows plug-in
The SetHttp2Windows plug-in reduces sidecar proxy memory consumption by lowering HTTP/2 flow-control window sizes. Use it when HTTP/2 or gRPC workloads cause excessive memory growth in sidecar proxies.
How it works
The HTTP/2 codec in each sidecar proxy maintains two buffer limits that act as soft caps on how many bytes the proxy buffers:
| Parameter | Scope | Default |
|---|---|---|
initial_stream_window_size | Per stream | 256 MB |
initial_connection_window_size | Per connection (all streams combined) | 256 MB |
When a slow upstream service cannot consume data as fast as the proxy receives it, data accumulates in the proxy's codec buffers up to these limits. At 256 MB per stream and per connection, a single connection can consume hundreds of megabytes of memory.
Reducing both values to a smaller threshold, such as 65536 (64 KB), directly limits per-stream and per-connection memory growth.
Restart all pods within the effective scope after you enable this plug-in. The new window sizes apply only after a pod restart.
Configuration fields
Name | Type | Required | Default | Description |
| string | No |
| Scope where the plug-in takes effect. |
| string | Yes | - | Port where the plug-in takes effect. For gateways, set this to the gateway listening port. For workloads, set this to the container port. |
| string | Yes | - | Initial connection-level flow-control window size in bytes. Recommended: |
| string | Yes | - | Initial stream-level flow-control window size in bytes. Recommended: |
When to use this plug-in
Enable SetHttp2Windows when sidecar proxies show high memory usage under HTTP/2 or gRPC traffic. Common symptoms:
Sidecar proxy memory grows steadily under sustained gRPC streaming or HTTP/2 traffic.
Upstream services process requests slower than the rate at which the proxy receives data.
Pod evictions or OOMKilled errors traced to sidecar containers.
Recommended values
Set both initial_connection_window_size and initial_stream_window_size to 65536 (64 KB). This value is sufficient for most workloads.
Lowering window sizes reduces how much data the proxy buffers at a time. For high-throughput streaming workloads, test with your actual traffic patterns to find the right balance between memory savings and throughput.