SystemKit

Reliability Patterns

The handful of techniques that recur across almost every system: idempotency keys, the transactional outbox, retries with backoff and jitter, circuit breakers, backpressure, and cache stampede protection. Learn each by the failure it prevents.

Lessons

  1. 01Make a retried payment safeA key chosen by the client marks repeated attempts as one operation, and it protects you only if it is stored durably alongside the effect.
  2. 02Stop writing to two placesWriting an event to a table in the same transaction as the business change replaces two unrelated writes with one atomic commit.
  3. 03Keep retries from sustaining an outageRetries add load at the moment a service has the least to spare, so they need spacing, randomness, and a hard limit.
  4. 04Stop slow work from spreadingA timeout bounds one wait, a circuit breaker stops calling a failing dependency, and load shedding refuses work a server cannot finish in time.
  5. 05Decide what happens when the queue is fullA queue absorbs bursts but not sustained overload, so it needs a limit and a deliberate rule for what happens at that limit.
  6. 06Survive a popular key expiringWhen a popular cache entry expires, every concurrent reader can miss at once, so rebuilds must be limited and expiries spread out.

Practice this chapter

  1. LabWhy does a service stay down after the outage is over?Set retries, backoff, and protections, predict whether a service recovers from a brief outage, and watch it happen.