A local-looking call remains remote
A gRPC service definition describes methods and message types, and generated code helps clients and servers communicate through those contracts. Protocol Buffers is a common choice for defining and encoding messages. The generated call can resemble a local method, but connection establishment, transport, server execution and reply delivery remain separate failure points. Sharing a type definition does not guarantee successful execution or business-level exactly-once behavior. Treat the call as a distributed interaction and decide what the caller should do if a response does not arrive after work may already have started.
Choose a call shape
Unary RPC sends one request and receives one response. Server streaming, client streaming and bidirectional streaming allow sequences in one or both directions. Sending a search specification once and receiving incremental results is a server-streaming example. Bidirectional streaming does not require a strict alternating request-response pattern. Ordering within each direction is different from the application’s correlation between messages. A consumer can also fall behind a producer, so dividing a result into smaller messages does not eliminate flow-control requirements or the need to bound buffering and resource usage.
Budget time explicitly
If a user request has a one-second budget, giving each sequential downstream call an unrelated one-second timeout can exceed the intended total. A deadline expresses when the RPC should finish, and propagated work should account for the time already spent. Deadline expiry or cancellation is not automatic rollback of an update that has already committed. Server code must cooperate with cancellation to stop unnecessary work. Design the waiting budget separately from the handling of side effects, and record enough request context to explain which part of an end-to-end operation consumed the available time.
Retry only with outcome semantics
Imagine an inventory-decrement RPC whose update commits just before its response is lost. A client-side error cannot by itself distinguish failure before the update from failure while returning its result. Retrying safely can require an operation identifier, deduplication and a way to retrieve the existing outcome. An RPC status is also not the entire business result model. Authentication, per-operation authorization, transport security and schema evolution require explicit design. Generated clients reduce repetitive encoding work, but they do not resolve these application and distributed-systems responsibilities automatically.