AI Dictionary › Fondamenti AI
The circuit breaker is a resilience pattern that protects a system from cascading failures: when calls to a service fail repeatedly, the breaker trips and blocks subsequent calls for a period, returning an immediate error instead of hammering a dying service. Like the breaker panel at home, it temporarily sacrifices one function to save the whole installation.
The circuit breaker is a resilience pattern that protects a system from cascading failures: when calls to a service fail repeatedly, the breaker trips and blocks subsequent calls for a period, returning an immediate error instead of hammering a dying service. Like the breaker panel at home, it temporarily sacrifices one function to save the whole installation.
The pattern has three states: closed (calls pass through normally, failures are counted), open (past the failure threshold, calls are rejected instantly) and half-open (after a cooldown, a few probe calls check whether the service has recovered; if so the breaker closes again, if not it reopens). This gives the struggling service room to breathe and recover.
In AI, circuit breakers shield applications from provider instability: if a model returns bursts of errors, the breaker trips and the LLM gateway reroutes traffic to an alternative model or serves a degraded response. In agents it prevents infinite loops of calls to broken tools. Beyond AI it is a pillar of microservices architectures, popularized by Netflix's Hystrix library (2012).
The name comes from electrical engineering: the automatic switch that opens a circuit on overload, whose modern version was patented by the German engineer Hugo Stotz in 1924. As a software pattern it was described and named by Michael Nygard in his 2007 book Release It!, now a classic of resilience engineering.
Il circuit breaker (interruttore automatico) è un pattern di resilienza che protegge un sistema dai guasti a catena: quando le chiamate verso un servizio falliscono ripetutamente, il breaker scatta e blocca le chiamate successive per un periodo, restituendo subito un errore invece di insistere contro un servizio agonizzante. Come il salvavita di casa, sacrifica temporaneamente una funzione per salvare l'impianto.
Il pattern ha tre stati: chiuso (le chiamate passano normalmente, i fallimenti vengono contati), aperto (superata la soglia di fallimenti, le chiamate vengono respinte all'istante) e semi-aperto (dopo un tempo di attesa, alcune chiamate di prova verificano se il servizio è guarito; se sì il breaker si richiude, se no torna aperto). Questo dà al servizio in difficoltà il respiro per riprendersi.
Nell'AI il circuit breaker protegge le applicazioni dalle instabilità dei provider: se un modello restituisce errori a raffica, il breaker scatta e il gateway LLM dirotta il traffico su un modello alternativo o attiva una risposta degradata. Negli agenti impedisce cicli infiniti di chiamate a strumenti guasti. Fuori dall'AI è un pilastro delle architetture a microservizi, reso popolare dalla libreria Hystrix di Netflix (2012).
Il nome viene dall'elettrotecnica: l'interruttore automatico che apre il circuito in caso di sovraccarico, la cui versione moderna fu brevettata dall'ingegnere tedesco Hugo Stotz nel 1924. Come pattern software fu descritto e battezzato da Michael Nygard nel libro Release It! del 2007, diventato un classico dell'ingegneria della resilienza.
From our network
Kaimaki Web — Websites That Win Customers
Custom websites, web apps and digital marketing for growing businesses.
Visit kaimakiweb.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.