Skip to content

Lesson 9 of 9 · 24m

When REST Is Still the Answer

Choose between gRPC and REST by consumer shape, operational constraints, caching, debugging, and ecosystem fit — not by ideology or benchmark screenshots.

The mature answer is not "gRPC is faster." Sometimes it is. Sometimes the bottleneck is JSON parsing, sometimes it is a missing database index, and sometimes it is a product architecture that should never have needed seventy RPCs to render a page. Protocol choice is about consumers and operations, not fashion.

gRPC is strong inside controlled systems

gRPC shines when both sides are operated by cooperating teams:

service-to-service RPC with typed contracts
high-volume internal traffic
streaming or bidirectional interaction
strong generated-client workflows
strict schema evolution requirements

HTTP/2 multiplexing, binary encoding, deadlines, cancellation, and first-class streaming are real advantages. So is the discipline of schemas.

REST is strong at the edges

REST or simple HTTP JSON is often better when:

public third-party developers integrate once a year
browser-native debugging matters
CDN and HTTP cache semantics are valuable
webhooks and simple callbacks dominate
tooling maturity across arbitrary languages matters more than wire efficiency

A curlable endpoint with predictable JSON lowers integration friction. grpcurl is useful, but it is not the universal vocabulary that curl is.

Browser support is still awkward

Browsers do not natively expose arbitrary gRPC transport in the way backend services use it. gRPC-Web requires proxy or server support and changes some streaming behavior. If the primary consumer is a browser application, REST/JSON or GraphQL may be simpler unless there is a strong reason otherwise.

Operational transparency differs

HTTP cache semantics, content types, status codes, and human-readable bodies make REST easy to inspect. gRPC is inspectable, but usually through tooling and generated schemas. If your incident responders cannot decode the traffic, the protocol tax is real.

That does not mean REST is automatically more debuggable in production. A badly versioned REST API with undocumented JSON is worse than a disciplined protobuf contract. Compare actual system design, not idealized examples.

Hybrid is normal

A sane architecture often looks like:

public REST/webhook edge
internal gRPC service mesh
event log for asynchronous integration
object storage for large binary payloads

Use each transport for its strength. Do not stream megabytes of file content through RPC merely because the channel exists. Upload to object storage and pass a reference.

Decision questions

Ask who consumes it, how often they upgrade, whether streaming is intrinsic, what failure visibility is needed, whether caching matters, and who carries the operational cost. If answers are vague, choose the simpler interface.

Field notes

  • Microbenchmarks rarely include client generation, schema governance, debugging, proxy behavior, or organizational cost.
  • Do not expose internal protobuf contracts directly as public API unless you are prepared to support them forever.
  • REST does not mean resource-model purity; pragmatic HTTP JSON is still REST-shaped enough for most teams.
  • Protocol conversion layers add failure modes. Avoid transcoding everything merely to avoid a decision.
  • The correct answer can change at the boundary: REST outside, gRPC inside is common for good reasons.

Was this lesson helpful?

Sign in to rate