Circuit Breaker

medium
Unit 18 · Datetime II0/1 to milestone

When a downstream service (an LLM API, a database) is failing, hammering it with retries makes things worse. A circuit breaker stops calling it for a while, then cautiously tries again.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Circuit Breaker · TechGradify