concept

Deadline Exceeded

The error returned when a request's overall budget expires — semantically distinct from a per-hop timeout, and a signal that must not be retried blindly.

deadlinesgrpcsemantics

A hop timeout says "this particular call took too long"; a deadline-exceeded says "the whole operation is out of time". The difference matters because they warrant opposite responses.

A hop timeout is a candidate for a retry: the budget may still permit another attempt against a different replica. A deadline exceeded is not retryable at that layer — there is no time left, and retrying guarantees wasted work.

gRPC makes this explicit with DEADLINE_EXCEEDED and a deadline propagated in call metadata; over HTTP it is a convention you implement, typically a header carrying either an absolute deadline or the remaining milliseconds.

Two implementation notes. Propagate an absolute deadline rather than a duration where clocks are reasonably synchronised, since a duration restarts at every hop and quietly extends the budget. And have services check the remaining budget before starting expensive work, not only when it expires — declining early returns capacity that would otherwise be spent on an abandoned request, which is a meaningful saving under stress.