Saltar al contenido
uencoder

gRPC Protocol Referencia

Referencia para gRPC: Protocol Buffers sobre HTTP/2, unary/servidor/cliente/bidi streaming, y interceptors.

RPC Model

gRPC defines services in .proto files with typed request/response messages. Four call types: unary (single request/response), server streaming, client streaming, and bidirectional streaming. All calls use HTTP/2 as transport with Protocol Buffers as the default payload. Status codes mirror HTTP with gRPC-specific additions. The framework generates client and server stubs for 10+ languages. Deadlines and cancellation propagate across service calls.

unary
Single req/resp
most common
streaming
Server, client, bidi
HTTP/2 streams
deadlines
Propagate and cancel
context deadline

Features and Ecosystem

gRPC interceptors provide middleware for logging, auth, and tracing. Health checking follows the gRPC Health Checking Protocol. Reflection enables dynamic service discovery. Load balancing is built-in with client-side resolution. gRPC-Web enables browser clients via a proxy. The protocol is used extensively in microservice architectures for its performance and type safety. Alternative JSON encoding is supported for debugging.

interceptors
Middleware chain
auth, logging
health
Health check protocol
grpc.health.v1
gRPC-Web
Browser support
via proxy

Herramientas relacionadas

参考链接