Understanding gRPC Print

  • backenddevelopment, backend, performance, guide, howto, solution, zillionkinghost, hosting
  • 0

Efficient service-to-service communication.

WHAT IT IS

A framework for calling procedures on another service, using a compact binary format.

WHAT IT USES

An interface definition describing services and messages Generated client and server code A binary encoding

WHAT THAT PROVIDES

Efficiency, in size and speed A strict contract Generated code in many languages Streaming in both directions

WHAT IT SUITS

Communication between internal services High-volume calls Polyglot environments where a shared contract matters

WHAT IT DOES NOT SUIT

Browser clients directly, without a proxy Public APIs for arbitrary consumers

WHY

It is not readable, and not directly callable from a browser or a command line without tooling.

WHAT THE CONTRACT PROVIDES

Types verified at build time on both sides.

WHAT TO BE CAREFUL WITH

Changing message definitions, which must remain compatible Reusing field numbers, which corrupts meaning Debugging, which requires tooling

WHAT TO PLAN

Versioning of the definitions.

WHAT TO COMPARE IT AGAINST

A well-designed REST API, which is frequently sufficient.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot