← Back to microservices patterns mapsync
↩️
Microservices Pattern
Synchronous REST / gRPC
Direct request-response communication where the caller waits for a downstream service.
Detailed Description
Synchronous calls are useful when the caller truly needs an immediate answer.
They should be protected with timeouts, retries, circuit breakers, and clear ownership of failure behavior.
Visual Diagram
REST (HTTP/JSON)
ServiceA → GET /users/123 → UserService
← { id:123, name:"Alice" } ←
waits synchronously
gRPC (Protobuf / HTTP2)
ServiceA → GetUser(id:123) → UserService
← User{id,name} ←
strongly typed, faster than RESTTradeoffs
Pros
Simple, immediate response, easy to debug locally
Cons
Temporal coupling, latency chains, cascading failures
Examples: Express REST, gRPC with Protobuf, GraphQL