Deadline vs Timeout
Timeout: duration remaining from the start of this operation
timeout(Duration::from_secs(5), operation()).await?;
Deadline: absolute point in time when the operation must complete
let deadline = Instant::now() + Duration::from_secs(5);
timeout_at(deadline, operation()).await?;
gRPC uses deadlines because they propagate naturally: pass the same deadline to downstream calls. The remaining time shrinks automatically as the call proceeds through the chain.
Timeouts don't propagate: a 5s timeout at each hop means the total latency budget is 5 × N, not 5.