← Lessons

quiz vs the machine

Gold1390

System Design

Protocol Overhead Reduction

Cutting per message framing, headers, and round trips to speed up the wire.

4 min read · core · beat Gold to climb

Overhead beyond the payload

Every message carries more than its useful data. Headers, framing, handshakes, and acknowledgements all add bytes and round trips. On chatty or small message workloads this overhead can dominate.

Sources of overhead

  • Verbose headers repeated on every request.
  • Text formats that are larger than a binary encoding.
  • Round trips for setup, negotiation, and acknowledgement.
  • Per message framing that adds up across many small messages.

Reductions

  • Binary encodings pack fields tightly versus verbose text.
  • Header compression sends a table once and references it after.
  • Multiplexed streams share one connection so framing and setup are paid once.
  • Persistent connections avoid repeating handshakes.

Balance

Tighter protocols are harder to debug than human readable text, and aggressive batching adds latency. Match the protocol to the path, using a lean binary protocol for hot internal links and a readable one where developer ergonomics matter.

Key idea

Reduce protocol overhead with binary encodings, header compression, and persistent multiplexed connections so useful data is a larger share of the wire.

Check yourself

Answer to earn rating on the learn ladder.

1. Which change reduces protocol overhead for many small messages?

2. What is a downside of very lean binary protocols?