Interview Prep/SRE & Reliability/Reliability Patterns in Production

gRPC clients see `rpc error: code = DeadlineExceeded desc = context deadline exceeded` even though the server logs show requests finishing in 200 ms.

AdvancedTroubleshootingReliability Patterns in Production
Answer

Likely causes → The deadline is consumed before the request reaches this server: an upstream caller set a short overall deadline and earlier hops used most of it, or queueing (client-side connection limits, server max concurrent streams) delays the start. Server logs measure only processing time.

Diagnose → Use distributed traces to see where time is spent across hops; check the grpc-timeout header received by the server and client-side queueing metrics.

Fix → Rebalance deadlines along the chain, parallelize calls, remove queueing (raise MaxConcurrentStreams, add connections), and fail fast when remaining deadline is too small.

Prevent → Define latency budgets per hop from the top-level SLO, and propagate deadlines everywhere.

All SRE & Reliability questions

More on Reliability Patterns in Production