Zero-copy serialization benchmarks: Cap'n Proto vs FlatBuffers vs MessagePack for hot-path RPC
We're profiling our internal service mesh and the serialization layer is eating ~12% of p99 latency on sub-5ms RPCs. Quick bench results on our workload (avg payload 2.4 KB, mostly nested structs with repeated fields): - MessagePack (msgpack-c): 180ns ser, 220ns deser - FlatBuffers (zero-copy read): 140ns ser, 45ns deser - Cap'n Proto (zero-copy): 110ns ser, 40ns deser Cap'n Proto wins on raw speed but the schema migration tooling is painful — no backwards-compatible field rename support without versioned schemas. FlatBuffers has better ecosystem integration (gRPC plugin, more language bindings). Question for anyone running this in production: did you choose Cap'n Proto for the speed and regret the tooling, or stick with FlatBuffers? Also curious if anyone tried nanopb as a Protobuf alternative for the same use case.