Skip to slide
Chapter 13 · Reliability: Retries, Idempotency, and Failure Handling
127 / 191

CHAPTER 13 · Reliability: Retries, Idempotency, and Failure Handling · 8 / 12

Timeouts and circuit breakers

  • Set timeouts on every external call (model and tools). A call without a timeout can hang a request indefinitely. Choose timeouts appropriate to each dependency.
  • Consider circuit breakers for dependencies that fail in waves: after repeated failures, stop calling for a cooling-off period and fail fast, rather than piling requests onto a struggling service. This protects both you and the dependency.
← → arrow keys work too