LearnThatStack Ace your next interview
API Design · question
Question 15 of 92

What are the main advantages of using HTTP/2 in gRPC?

beginner
← All API Design questions
Re-explain

HTTP/2 lets gRPC run many calls at once over one connection, in a compact binary format.

  • Multiplexing sends many requests and responses at the same time over a single connection.
  • Binary framing is cheaper to parse than the text protocol of HTTP/1.1.
  • Header compression with HPACK cuts the bytes spent on repeated headers.
  • Flow control stops a fast sender from overwhelming a slow receiver.
  • Reusing one connection avoids new handshakes and cuts latency.

HTTP/2 also defines server push, but gRPC doesn't use it. The grpc-java client turns push off in its HTTP/2 settings, for example. Server streaming covers the case of many responses to one request.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for API Design One question at a time. Answer out loud, get graded, see what you missed.
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

What you can say

  1. HTTP/2 lets gRPC run many calls at once over one connection, and it sends them in a compact binary format instead of text.
  2. Multiplexing matters most, because requests and responses run as separate streams on one connection and don't wait in line behind each other like they do on HTTP/1.1.
  3. Binary framing is cheaper to parse than HTTP/1.1 text, and HPACK compresses headers, so the headers repeated on every call cost far fewer bytes.
  4. Flow control stops a fast sender from overwhelming a slow receiver, and reusing one connection skips new handshakes, which cuts latency.
  5. HTTP/2 also defines server push, but gRPC doesn't use it, and server streaming handles many responses to one request.
  6. One downside is that a single long-lived connection sends every call to one backend behind an L4 load balancer, so gRPC needs per-call balancing at L7 or in the client.

Weak answers to avoid

  • Says gRPC uses server push gRPC doesn't use HTTP/2 server push. Many responses to one request come from server streaming, so name that instead.
  • Lists features with no payoff Reciting binary, HPACK and multiplexing is just a list. Tie each one to the cost it cuts, like parse time, header bytes, handshakes or calls waiting in line.
  • Claims multiplexing ends all head-of-line blocking It stops HTTP requests queuing behind each other, but a lost TCP packet still stalls every stream on the connection. Say that plainly if asked.
  • Credits HTTP/2 for Protobuf's small payloads Protobuf makes the message body compact. HTTP/2's binary framing and HPACK shrink the framing and headers. Keep the two layers apart.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the API Design cheatsheet.

← Back to all API Design questions
Pro · $10/mo

74 of 92 API Design answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime