tech

Introduction to gRPC

grpcapiprotocol-buffers

gRPC is a high-performance RPC framework that uses Protocol Buffers for serialization.

Why gRPC

  • Strongly typed contracts via .proto files
  • Bi-directional streaming
  • Built-in authentication and load balancing
  • Efficient binary encoding

Hello World

service Greeter {
  rpc SayHello (HelloRequest) returns (HelloReply);
}

message HelloRequest {
  string name = 1;
}

gRPC excels for internal microservice communication where performance matters.