How backend Go services avoid turning one slow dependency into a bigger outage.
Your win: explain backpressure clearly, connect timeouts and retries to concurrency limits, and recognise why “just retry” is not a senior answer when a dependency is already slow or failing.
In plain English
If work arrives faster than a service can safely handle it, something must push back. If nothing does, queues grow, memory grows, latency grows, and the system often fails more noisily than the original problem.
Why this separates senior answers from surface-level ones
Anyone can say “add a timeout” or “retry a few times.” The senior version is better: it asks what happens to the whole system when many requests time out together, all retry together, and all keep creating more concurrent work while a dependency is already unhealthy.
The four safety levers
Timeouts
Do not wait forever for downstream work.
Cancellation
Stop work that is no longer useful.
Retries
Try again carefully, not infinitely.
Bounds
Limit concurrency and queue growth.
Senior framing
Retries without limits are not resilience. They are often load amplification. A safe retry strategy needs a timeout, cancellation, a max-attempt rule, and some thinking about duplicate side effects.
Repo anchor
Your codebase already contains good teaching material here: Kafka consumer retry logic, context-derived deadlines, and background work patterns where cancellation and shutdown handling are explicit. The important skill is learning to read those patterns as overload-control mechanisms, not just as code flow.
What backpressure looks like in Go
Bounded worker pools
Buffered channels with intentional capacity
errgroup.SetLimit(...) or semaphore-like caps
Rejecting or slowing intake when the system is saturated
Common mistake
Treating every timeout as a reason to retry immediately and everywhere. Under a partial outage, that can multiply the original problem and keep the unhealthy dependency under constant pressure.
Read this next
Pipelines and context
The official articles still give the best foundation: stop work when nobody needs it, and make every stage in a chain respect cancellation.