At 40Gbps, serialization stops being a library choice and becomes a memory-bandwidth problem. serde is excellent and it is also the wrong tool once the copy itself is the bottleneck.
What zero-copy actually buys you
rkyv writes an archived representation that is valid to read directly from the byte buffer. There is no deserialization step, only validation and pointer arithmetic, which means a message never materialises as a second allocation in your process.
The trade is strictness: archived types have layout requirements, and you accept a validation pass to get memory safety back. For request/response traffic that fans out to many readers, that trade is overwhelmingly favourable.
Kernel ring buffers and the copy you did not know about
A standard socket read copies from kernel space into user space before your serialization layer ever sees the bytes. io_uring with registered buffers removes that copy, and combined with an archived format the payload is read exactly once, by the CPU, into cache.
- Register buffers up front; per-call registration reintroduces the overhead.
- Size the ring to your p99 concurrency, not your average.
- Pin the completion thread — cross-socket wakeups will dominate your tail latency.
SIMD parsing for the fields that stay strings
Not everything can be archived. Free-text fields still need scanning, and a vectorised scan over a 64-byte lane recovers most of what a naive byte loop costs. The measurable win is in header parsing, where field boundaries are dense and predictable.


