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

> Hacker News story 49182586 · language: en · submitted 2026-08-05
> Web version: https://zeli.app/story/49182586
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 44 · by [dilyevsky](<https://news.ycombinator.com/user?id=dilyevsky>) · 💬 10
[original](<https://apoxy.dev/blog/oghttp2-vs-nghttp2>) · [HN discussion](<https://news.ycombinator.com/item?id=49182586>)

## Summary

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.

## Key quote

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

## HN discussion (10 comments)

### [basilikum](<https://news.ycombinator.com/item?id=49184549>)

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

### [rightbondsadmin](<https://news.ycombinator.com/item?id=49184625>)

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

### [nosefrog](<https://news.ycombinator.com/item?id=49184634>)

> So tired of these AI generated articles.

---

## Cite

- Page: https://zeli.app/story/49182586
- Date: 2026-08-05
- Source: apoxy.dev (https://apoxy.dev/blog/oghttp2-vs-nghttp2)
- Hacker News: https://news.ycombinator.com/item?id=49182586

## Other languages

- zh: https://zeli.app/zh/story/49182586 · markdown: https://zeli.app/zh/story/49182586.md
- ko: https://zeli.app/ko/story/49182586 · markdown: https://zeli.app/ko/story/49182586.md
- de: https://zeli.app/de/story/49182586 · markdown: https://zeli.app/de/story/49182586.md
- es: https://zeli.app/es/story/49182586 · markdown: https://zeli.app/es/story/49182586.md
