TIL
A good circuit-breaker fallback is the last cached response
When a circuit breaker opens because a downstream is failing, you stop calling it for a while to let it recover. The question is what to return in the meantime.
The easy answer is an error. But for a lot of reads, a slightly stale response is better than no response. So we started returning the last cached value when the breaker is open.
The user still sees something while the downstream is down, and we are not hammering a service that is already struggling. Once the breaker closes again, fresh data comes back.
Caveat: this only makes sense for data where stale is acceptable. For anything that has to be correct right now (balances, stock), an error is the honest answer.