HTTP/2 vs HTTP/3 Interview Preparation Guide

🧠

Ready to test yourself?

Each test is 5 questions with varying difficulty.

Master AI/ML with AI Prep app

AI Prep covers AI Agents, Generative AI, ML Fundamentals, NLP & LLMs and a lot more, with adaptive tests and daily challenges. Fully offline on Android. Free to try, one-time unlock for lifetime access.

Download AI Prep, Free to Try

Introduction

The evolution from HTTP/2 to HTTP/3 represents a fundamental shift in web transport, moving from a TCP-based model to a UDP-based architecture via the QUIC protocol. In 2026, understanding this transition is critical for backend, infrastructure, and site reliability engineers. While HTTP/2 introduced multiplexing to solve HTTP/1.1's sequential request issues, it remained constrained by TCP's head-of-line blocking. HTTP/3 addresses this by decoupling streams from the underlying transport layer. Interviewers ask about this topic to gauge a candidate's grasp of transport-layer mechanics, congestion control, and the trade-offs between reliability and latency. Junior candidates are expected to understand the high-level differences in stream handling, while senior candidates must demonstrate deep knowledge of QUIC's connection migration, 0-RTT handshakes, and how shifting congestion control to user-space impacts system observability and performance.

Why It Matters

The transition to HTTP/3 is driven by the need to minimize latency in high-packet-loss environments, such as mobile networks. HTTP/2, while efficient, suffers from TCP head-of-line (HOL) blocking: if a single packet in a TCP stream is lost, all subsequent streams are stalled until the missing packet is retransmitted. HTTP/3, by utilizing QUIC, treats each stream independently at the transport layer. If one stream loses a packet, only that specific stream is affected, while others continue unhindered. This provides significant performance gains in real-world conditions where packet loss is frequent. Furthermore, HTTP/3 enables 0-RTT connection establishment, allowing clients to send data immediately upon reconnecting to a known server, which is vital for modern mobile-first applications. From an interview perspective, this topic is high-signal because it forces candidates to explain why standard TCP mechanisms are insufficient for modern web traffic and how user-space transport protocols change the landscape of network observability and security.

Core Concepts

Architecture Overview

HTTP/2 runs on top of TCP, which handles reliability and congestion control in the kernel. HTTP/3 replaces TCP with QUIC, moving these responsibilities into user-space while running over UDP.

Data Flow

Data flows from the application through the QUIC layer, which manages streams and packet loss, then is encapsulated in UDP packets for transmission.

   [HTTP/3 Application]      [HTTP/2 Application]
            ↓                          ↓
     [QUIC (User-Space)]        [TLS (User-Space)]
            ↓                          ↓
     [UDP (Network Layer)]      [TCP (Kernel Stack)]
            ↓                          ↓
     [Network Interface]        [Network Interface]
            ↓                          ↓
     [Remote Server]            [Remote Server]
Key Components
Tools & Frameworks

Design Patterns

Stream-Based Multiplexing Transport Pattern

Mapping individual application requests to independent QUIC streams to prevent blocking.

Trade-offs: Reduces latency but increases the number of concurrent streams the server must track.

0-RTT Resumption Security/Performance Pattern

Using pre-shared keys from previous sessions to encrypt data in the initial handshake packet.

Trade-offs: Improves latency significantly but introduces a risk of replay attacks if not handled correctly.

Connection Migration Reliability Pattern

Utilizing Connection IDs to maintain state when the client's IP changes.

Trade-offs: Improves user experience during network transitions but complicates load balancing at the edge.

Common Mistakes

Production Considerations

Reliability QUIC provides built-in reliability, but connection migration requires careful handling of state across load balancers.
Scalability HTTP/3 scales well, but the CPU cost of user-space processing is higher than kernel-space TCP.
Performance Significant latency reduction in high-loss environments; 0-RTT provides near-instant connection.
Cost Higher CPU usage per request due to user-space transport implementation.
Security Requires TLS 1.3; 0-RTT replay attacks must be mitigated at the application level.
Monitoring Requires specialized tools to track QUIC-specific metrics like stream count and packet loss.
Key Trade-offs
Latency vs CPU overhead
Security (0-RTT) vs Replay risk
Network flexibility vs Firewall complexity
Scaling Strategies
Deploying QUIC-aware edge proxies
Offloading QUIC processing to specialized hardware
Using connection ID-based load balancing
Optimisation Tips
Tune congestion control parameters for specific network types
Implement aggressive connection pooling
Use TLS 1.3 session tickets for 0-RTT

FAQ

Is HTTP/3 always faster than HTTP/2?

Not necessarily. HTTP/3 excels in high-packet-loss environments like mobile networks. In stable, low-latency environments like data centers, HTTP/2 over TCP is often highly optimized and can perform similarly or better due to kernel-level performance.

What is the biggest difference between HTTP/2 and HTTP/3?

The underlying transport protocol. HTTP/2 uses TCP, which is prone to head-of-line blocking. HTTP/3 uses QUIC (over UDP), which decouples streams, allowing independent packet loss recovery.

Can I use HTTP/3 without TLS 1.3?

No. TLS 1.3 is a mandatory component of the QUIC protocol used by HTTP/3. It provides the necessary security and handshake integration for the protocol to function.

Why do firewalls often drop HTTP/3 traffic?

Many legacy firewalls are configured to block UDP traffic by default or to strictly inspect TCP traffic. Since HTTP/3 uses UDP, it is frequently misidentified as malicious or non-compliant traffic.

What is head-of-line blocking in HTTP/2?

It occurs at the TCP layer. If a single packet in a TCP stream is lost, the entire connection is stalled until that packet is retransmitted, even if other streams within the connection are ready.

How does QUIC handle connection migration?

QUIC uses a Connection ID instead of the traditional 4-tuple (IP/Port). This allows the connection to persist even if the client's IP address changes, such as switching from Wi-Fi to cellular data.

What is 0-RTT and why is it important?

0-RTT (Zero Round-Trip Time) allows a client to send data in the very first packet of a connection by using session tickets from previous connections. It significantly reduces latency for returning users.

Is QUIC the same as UDP?

No. QUIC is a transport protocol built on top of UDP. While it uses UDP for packet delivery, it adds features like reliability, congestion control, and security that raw UDP lacks.

What is QPACK and how does it differ from HPACK?

HPACK is the header compression for HTTP/2, while QPACK is for HTTP/3. QPACK is designed to handle out-of-order stream delivery, which is common in QUIC, whereas HPACK requires strict ordering.

Does HTTP/3 replace the need for load balancers?

No, but it requires load balancers that understand the QUIC protocol. Standard L4 load balancers that only look at TCP ports will not be able to correctly route QUIC traffic based on Connection IDs.

Related Roles

Master AI/ML with AI Prep app

AI Prep covers AI Agents, Generative AI, ML Fundamentals, NLP & LLMs and a lot more, with adaptive tests and daily challenges. Fully offline on Android. Free to try, one-time unlock for lifetime access.

Download AI Prep, Free to Try
← Back to Interview Prep