pub const STREAM_BUF_SIZE: usize = _ /* 65_536usize */;Expand description
Read/write buffer size used for streamed response bodies and spooled uploads.
A 4 KiB buffer turns a 1 GiB transfer into ~262k reads and ~262k socket writes; 64 KiB cuts both by 16x while staying well inside cache. This is the size nginx, hyper and tower-http settle on for bulk transfer.