Running It in Production
What separates a prototype from infrastructure someone is paged for: observability, honest percentiles, load testing, graceful shutdown and a reliability posture you can defend.
// lessons
- 01
Counters, Gauges & Histograms
Pick the right instrument for a question, and see what each one cannot answer.
- 02
Percentiles From Buckets, and Why You Cannot Average Them
Compute p50/p95/p99 from bucket counts, and merge two instances without lying.
- 03
Structured Logs & a Correlation ID
Thread one ID through a call chain and reconstruct a single request out of an interleaved stream.
- 04
Backoff, Jitter & a Retry Budget
Bound retry amplification with a budget instead of hoping the dependency recovers.
- 05
A Circuit Breaker as a State Machine
Stop sending traffic into a dead dependency, and probe it back to life without a stampede.
- 06
Graceful Shutdown: Drain, Deadline, Force-Close
Take a pod out of rotation and finish its in-flight work without a deploy dropping requests.
- 07
Little's Law: A Latency Target Is a Concurrency Limit
Turn a latency SLO into the number of concurrent requests you are allowed to admit.
Every exercise compiles and runs in the Forge sandbox — standard library only, no external crates.
