The hidden cost of mpsc channels
Summary
The post investigates how Tokio mpsc channels allocate memory, revealing a surprising fixed cost tied to a 32-slot block design. It uses a Rust playground to quantify allocations and discusses real-world impact on many small channels and Hyper connections, offering a workaround by switching to a more memory-efficient channel type at some throughput cost.