Google's HTTP/2 codec slows Envoy by 15–25%

Google's HTTP/2 codec slows Envoy by 15–25%

A routine Envoy upgrade caused CPU usage to jump by a fifth. Bisecting versions pointed to Envoy v1.34, which switched the default HTTP/2 codec from nghttp2 to Google's oghttp2. Benchmarks on four microarchitectures confirmed nghttp2 beats oghttp2 by 15–25% RPS/core on header-heavy proxied traffic. The investigation reveals that header decompression, specifically Huffman decoding, dominates codec CPU time. nghttp2 uses a precomputed finite-state machine for fast prefix decoding, while oghttp2's approach is less efficient. The post explains the HPACK compression scheme and the history of Huffman coding, setting up a sequel on making the fast codec even faster.

The regression is real, portable, and lives somewhere in the codec.
  1. basilikum

    this looks like it could be an interesting read that i would be bothered to read if a human bothered to write it.

  2. rightbondsadmin

    this reminds that protocol compliance and performance aren't always aligned

  3. nosefrog

    So tired of these AI generated articles.

More from this day

2026-08-05