HTTP/2

Protocols & Standards
A major revision of HTTP that introduces multiplexing, header compression, and improved performance over HTTP/1.1.
← Back to Glossary

What is HTTP/2?

HTTP/2 is a major revision of the HTTP protocol (standardized as RFC 7540) that introduces binary framing, multiplexing, header compression, and server push to dramatically improve web performance over HTTP/1.1.

HTTP/2 vs HTTP/1.1

FeatureHTTP/1.1HTTP/2
FormatText-basedBinary
ConnectionsMultiple (6-8 per host)Single multiplexed
Request handlingSequentialParallel streams
Header compressionNoneHPACK compression
Server pushNot availableSupported
PrioritizationNoneStream priorities

How HTTP/2 Works

HTTP/1.1 (Head-of-Line Blocking):

Connection 1: Request A ──────────► Response A

Connection 2: Request B ──────────► Response B

Connection 3: Request C ──────────► Response C

(Multiple connections, sequential per connection)

HTTP/2 (Multiplexing):

Single Connection:

├── Stream 1: Request A ──► Response A

├── Stream 2: Request B ──► Response B

├── Stream 3: Request C ──► Response C

└── All interleaved on same connection

Key Features

Binary Framing Layer

HTTP/2 Frame Structure:

┌─────────────────────────────────────┐

│ Length (24 bits) │

├─────────────────────────────────────┤

│ Type (8 bits) │ Flags (8 bits) │

├─────────────────────────────────────┤

│ Stream Identifier (32 bits) │

├─────────────────────────────────────┤

│ Frame Payload (variable) │

└─────────────────────────────────────┘

HPACK Header Compression

ScenarioHTTP/1.1 HeadersHTTP/2 Headers
First request~800 bytes~800 bytes
Subsequent requests~800 bytes each~20-50 bytes (indexed)

Stream Prioritization

Priority Tree:

Root (connection)

├── CSS (weight: 256, high priority)

├── JavaScript (weight: 220)

└── Images (weight: 110, lower priority)

Server Requirements

ServerHTTP/2 Support
nginx1.9.5+
Apache2.4.17+ (mod_http2)
Node.js8.4+ (native)
IISWindows 10/Server 2016+

Performance Benefits

Best Practices

1. Enable TLS: HTTP/2 practically requires HTTPS (browsers enforce it)

2. Reduce domain sharding: Multiple domains now hurt performance

3. Stop concatenating files: Multiplexing makes bundling less necessary

4. Use server push carefully: Push only critical resources

5. Monitor performance: Verify HTTP/2 improves your specific use case

HTTP/2 delivers significant performance improvements for most websites through more efficient use of network connections.

Put This Knowledge to Work

Use DomScan's API to check domain availability, health, and more.