REST vs gRPC
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
pick between them using four criteria.
Planned topics
- Contract: REST commonly uses OpenAPI (optional); gRPC requires a
.protofile and generates code. - Performance: gRPC uses binary Protocol Buffers over HTTP/2, usually smaller and faster; REST commonly sends JSON over HTTP/1.1 or HTTP/2.
- Tooling: REST is easy to test with curl and browsers; gRPC needs special clients (grpcurl).
- Browsers cannot call gRPC directly; they need gRPC-Web or a gateway.
- Typical split: REST for public APIs, gRPC for internal service-to-service calls with strict contracts.
Draft outline details
Demonstration
a comparison table with contract, format, streaming, browser support, and debugging.
Check your understanding
Can a browser call a gRPC service directly?
Show answer
No; it needs gRPC-Web or a gateway.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.