Skip to slide
157 / 221

CH 13 · Reliability: Retries, Idempotency, and Failure Handling · 09/13

Read as one page

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.

Finished this idea?

Your learning progress stays in this browser.