Skip to main content

DEFAULT_BACKPRESSURE_BOUNDARY

Constant DEFAULT_BACKPRESSURE_BOUNDARY 

Source
pub const DEFAULT_BACKPRESSURE_BOUNDARY: usize = _; // 65_536usize
Expand description

Write buffer size at which the underlying Framed transport starts flushing frames to the socket from poll_ready, replacing the tokio-util default of 8KiB.

RLPx callers queue batches of messages (e.g. transaction broadcasts) and drive one flush per batch; the 8KiB default splits such a batch into one write syscall per few messages. A larger boundary batches them into fewer, larger writes. Once grown, the write buffer’s capacity is retained for the connection’s lifetime, so this also bounds the resident write buffer per connection.