Circuit Breaker Design Pattern

Azareal

Paragon
Joined
Dec 18, 2010
Messages
1,680
Reaction score
353
FP$
4,498
I started doing something like this a year ago, but I never really knew that it had a name until something like six months ago.

The circuit breaker design pattern, or at-least my approach to it, is where if your database goes down, then you set a value so that subsequent requests won't try to hit it as-well, and then, it checks occasionally to see whether it should release.

One thing I use this for is to reduce the number of logs when a database drops, as it literally logs every single error. Also, it might also help prevent stampedes where the database briefly goes back up for an instant only to be knocked down by high traffic.
 
Back
Top Bottom