Skip to main content

MAX_FRAME_BYTES

Constant MAX_FRAME_BYTES 

Source
pub const MAX_FRAME_BYTES: usize = _; // 4_194_304usize
Expand description

Hard cap on per-frame size (request or response) for the RPC control plane.

SECURITY (#162): the original 64 MiB cap would let an attacker buffer up to 64 MiB × DEFAULT_STREAM_LIMIT (= 4 GiB) across concurrent streams before any application-layer rejection. The RPC plane carries control messages only (SQL queries, metric batches, Cap’n Proto envelopes) — no ingest blobs, no streaming chunks. Those belong on the streaming ALPN (moq-net). 4 MiB is generous for any realistic control-plane payload.