Welcome to our Circuit Breakers Exercise, for day 12 of 30 days of Testability. Decomposability is really important to testability, enabling you to test individual components and isolate problems quickly for remediation.
Goal
Identify how decomposability and testability are linked and how they can be applied in your situation.
Objectives
Identify where and how to apply circuit breakers.
Exercise
Choose an area of an application of your choice to decompose. Identify where you might add circuit breakers to this system. Share your reasoning on the Club.
I decided to look at how the circuit breaker model could be applied to a new feature that was recently added to one of our applications.
Previously, if the user needed to export some items in a list they would need to export the entire list. Sometimes there can be several hundred items in that list, so we added a new feature that would allow the user to filter out certain list items.
If the new export feature were to fail, the user would not be able to export anything at all. Therefore, by applying the circuit breaker model we can allow the entire list to be exported if the new version fails.
Here is a diagram showing how the circuit breaker model could be applied:
This is really interesting. How long would you have the circuit breaker in place? At some point you would want to get rid of, say the old service. Perhaps 48-72 hours after deployment you would remove it?