Koskamo

Deadlines and timeouts

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

A deadline is a point in time past which a client is unwilling to wait for a response; some language APIs instead take a timeout, a maximum duration, which is converted to a deadline by adding it to the current time when the call starts. By default gRPC does not set a deadline, so a client can end up waiting effectively forever — always set a realistic deadline explicitly, starting from an educated guess based on network latency and server processing time, validated by load testing. Once the deadline passes, the client fails the RPC with the DEADLINE_EXCEEDED status, and the server automatically cancels the call with the CANCELLED status; the server application remains responsible for stopping any activity it spawned, so long-running work should periodically check whether the initiating RPC was cancelled. When your server calls another server, propagate the deadline to the outgoing RPC: some implementations do this by default (Java, Go) and others require explicit enabling (C++). gRPC converts the propagated deadline into a timeout with elapsed time already deducted, which shields the system from clock skew between servers. Scope: gRPC. Reviewed October 4, 2026.

Source and provenance

Original source
grpc.io
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.