gRPC vs HTTP, and HTTP/1.1 vs HTTP/2 vs HTTP/3 compared
Company: ByteDance
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
The same infrastructure loop asked protocol fundamentals: compare HTTP/1.1, HTTP/2 and HTTP/3, and compare gRPC with plain HTTP. Answer as an engineer who has to choose these protocols and run them in production.
### Clarifying Questions
- Is the comparison about browser-facing traffic, service-to-service calls inside a data center, or both?
- Do the clients and everything on the network path (proxies, load balancers, firewalls) support HTTP/2 and allow UDP?
### Part 1 — HTTP/1.1 vs HTTP/2 vs HTTP/3
How do HTTP/1.1, HTTP/2 and HTTP/3 differ? For each, explain how requests share a connection, where head-of-line blocking happens, and what the transport and the connection handshake look like.
```hint Follow the blocking
Track where head-of-line blocking happens in each version, and which layer each new version changed to get rid of it.
```
#### What This Part Should Cover
- The connection and multiplexing model of each version, and its framing and header compression
- Head-of-line blocking at the HTTP layer versus the transport layer
- Transport and handshake differences, including what QUIC changes
- The operational costs of adopting each version
### Part 2 — gRPC vs HTTP
How does gRPC differ from calling a plain HTTP API with JSON bodies? When would you choose each?
```hint Inherited versus added
gRPC runs on top of HTTP/2. Separate what it adds (contract, encoding, call types) from what it inherits, including how its connections behave behind a load balancer.
```
#### What This Part Should Cover
- The interface definition, code generation and binary encoding versus JSON
- Call types, deadlines, status codes and metadata
- Load balancing, browser support and debuggability trade-offs, and a reasoned choice
### What a Strong Answer Covers
- Correct mechanics of multiplexing and head-of-line blocking in each HTTP version
- Transport and handshake differences, including QUIC's built-in TLS 1.3 and connection migration
- What gRPC adds over HTTP/2 and what it costs
- Operational consequences: long-lived connections and load balancing, networks that block UDP, observability
- A choice for a concrete case, with the reasoning
### Follow-up Questions
- Your gRPC service runs five replicas behind a Kubernetes Service, but one replica gets almost all of the traffic. Why, and how do you fix it?
- HTTP/2 server push was largely abandoned. Why?
- A corporate network blocks UDP. What happens to an HTTP/3 client?
- How would you expose a gRPC service to browsers?
Overview: Compare HTTP/1.1, HTTP/2 and HTTP/3 on connection reuse, multiplexing, head-of-line blocking and handshakes, then contrast gRPC with plain HTTP and JSON APIs and say when to choose each. It tests protocol mechanics and the operational trade-offs of running these protocols in production.
Read the full ByteDance Software Engineer interview experience this question came from