Build the safeguards
Eight explained steps, a source example and a checkpoint at each decision.
Read the tutorialGo / Distributed systems / Recovery
Choose a pattern by the failure it addresses. Several safeguards can be necessary at once.
| Approach | Useful when | Decision or limitation |
|---|---|---|
| Attempt timeout | Bound one downstream wait | Does not bound all retries by itself |
| Request deadline | Bound an entire operation | Every layer must propagate and observe it |
| Retry budget | Cap extra attempts | Requires transient-error and operation-safety rules |
| Bulkhead | Bound concurrent dependency work | Needs a policy for rejected or queued requests |
| Circuit breaker | Skip calls while a dependency appears unhealthy | Requires recovery probes and suitable thresholds |
| Load shedding | Reject excess work before consuming scarce capacity | Makes an explicit availability tradeoff |
| Environment | What you can do | Scope |
|---|---|---|
| This browser lab | Click, compare, reset and inspect exact source | 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. |
| Independent download | Run the same prebuilt lab with Python’s local server | No package installation or automatic external calls needed for the prebuilt preview |
| Native exercise | Run language tests and the included local adapter or script | Requires the documented local toolchain; does not provision a cloud service |
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.
Begin with an observable outcome, inspect the decisions that produced it, then test a repair. The companion tutorial explains the mechanism; the how-to guide takes the same source into an independent environment.
Customer.io’s backend role emphasizes Go systems, recovery, backpressure and reliability tradeoffs.
Eight explained steps, a source example and a checkpoint at each decision.
Read the tutorialUnderstand where each pattern helps and which tradeoffs remain.
Compare approachesDownload the independent environment, run the native checks and try a specific extension.
Open the how-to guide