By Chason ArthurRevision 138.057Published Updated

Go / Distributed systems / Recovery

One slow service takes everything down.

A dependency slows down. Callers pile up. Retries ask it to do even more work. Change the policy and see what happens to capacity, failures and recovery.

The idea in plain language

Resilience means deciding how much work a request may start, how long it may wait and what should happen when the dependency cannot keep up. A rejected request is visible; an uncontrolled pile of waiting work is harder to recover from.

Actual Go runs as WebAssembly with timed in-process dependency calls. The native download uses real loopback HTTP. These fixtures show control flow and cleanup; they are not a multicore benchmark, a network-fault simulator or a production capacity result.

Your independent testing environment

Make the failure visible.

Start with slow responses. Compare attempts, peak in-flight work and explicit rejections. The recovery scenario sends a short sequence so you can observe the circuit opening, skipping calls and permitting a later probe.

Six callers meet a slow dependency. Compare per-attempt timeouts and total request budgets.

Ready. Choose an example and run both implementations.

Explain the result

The safe implementation allows at most three dependency calls in flight and returns with zero active calls. Recovery eventually permits successful probes. Shed requests are counted separately from work that started and failed.

Open the exact source behind this edition. The viewer checks each file against its SHA-256 manifest and explains the decision it implements.

Choose your next step

Build the safeguards

Eight explained steps, a source example and a checkpoint at each decision.

Read the tutorial

Compare the alternatives

Understand where each pattern helps and which tradeoffs remain.

Compare approaches

Run and extend it locally

Download the independent environment, run the native checks and try a specific extension.

Open the how-to guide

Before you try it

Do I need to know how to code?

Start with Run and read the comparison. The tutorial introduces the code after you have seen the behavior. The how-to guide separates a no-install route from the native developer exercise.

What happens to the experiment when I reset?

Reset discards this lab’s temporary state and cancels or terminates its pending work. These examples use invented records. No account, production data or cloud deployment is needed.

What does the browser experiment establish?

Actual Go runs as WebAssembly with timed in-process dependency calls. The native download uses real loopback HTTP. These fixtures show control flow and cleanup; they are not a multicore benchmark, a network-fault simulator or a production capacity result.