Skip to main content
InterviewHubPRO
Section Overview
Q28

Question 28 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

56%
Networking & Protocols (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What is HTTP/2 HPACK Header Compression?

senior LevelHTTP & REST APIs

In Simple Words: In HTTP/1.1, user cookies and user-agent headers send 1-2 KB of redundant text with every single asset request:

  • HPACK: Uses two tables:
    1. Static Table: Predefined list of 61 common headers (e.g. :method: GET = Index 2).
    2. Dynamic Table: Remembers headers sent earlier in the connection. If the User-Agent was already sent, subsequent requests send a single 1-byte index reference!
    3. Huffman encoding compresses remaining strings.