Why should every network call have a timeout, and how do you choose the value?
BeginnerConceptRelease Engineering & Reliability Patterns
Answer
Without a timeout, a hung dependency holds threads, connections and memory until the caller runs out and fails too, spreading the outage. Pick timeouts from the dependency's measured latency (a bit above its p99.9) and the caller's own budget: the total of downstream timeouts plus retries must fit inside the caller's timeout. Set connect timeouts short (hundreds of milliseconds) and request timeouts based on the operation. Never rely on library defaults; many are infinite or minutes long.
More on Release Engineering & Reliability Patterns
Why are releases the biggest source of incidents, and what does SRE do about it?BeginnerWhat is a canary release?BeginnerWhat is progressive delivery?IntermediateShow an Argo Rollouts canary with a Prometheus analysis.AdvancedBlue-green vs canary: when do you choose each?IntermediateWhat are feature flags and how do they improve reliability?Beginner