Networking interview question · Most asked
Compare HTTP/1.1, HTTP/2 and HTTP/3.
Summary
HTTP/1.1 is text-based with one request at a time per connection. HTTP/2 uses binary frames and multiplexes many streams over one TCP connection with header compression. HTTP/3 does the same over QUIC (UDP), removing TCP head-of-line blocking and combining transport and TLS setup into one round trip.
Longer Answer
Browsers open around six HTTP/1.1 connections per host; HTTP/2 needs one. A lost packet stalls all HTTP/2 streams because TCP delivers in order; QUIC delivers streams independently and supports connection migration. gRPC requires HTTP/2 end to end. Typically you enable HTTP/2 and HTTP/3 at the CDN or load balancer and keep HTTP/1.1 to backends.
Key Points
- 1.1: one request at a time per connection.
- 2: multiplexed streams over TCP.
- 3: QUIC over UDP, no TCP head-of-line blocking.
- Enable at the edge; gRPC needs HTTP/2.
Explanation
What interviewers look for
The head-of-line blocking distinction and practical deployment.
More most-asked Networking questions
- How does NAT work, and what are its limits?
- What's the difference between TCP and UDP, and when would you choose UDP?
- What happens, at the network level, when you type a URL into a browser and press Enter?
- What is CIDR notation? How many usable addresses are in a /26, and in an AWS /26 subnet?
- How does DNS resolution work, and what does a record's TTL control?
- What does TLS provide, and how does certificate validation work?
- What do 502, 503 and 504 errors from a load balancer usually mean?
- What's the difference between stateful and stateless firewalls? Give cloud examples.