How are you coordinating resilience patterns (retry + circuit breaker + timeout) in Python? (original) (raw)
I’ve been working on a few services where I need retry, circuit breaker, and timeout to work together — not just stacked independently.
The problem I keep running into: tenacity handles retries well, pybreaker handles circuit breaking, but they don’t share state. Retries keep firing even when the circuit breaker should have opened. Timeouts don’t account for retry attempts already spent.
In Java, Resilience4j solves this by coordinating all patterns in one system. I couldn’t find a Python equivalent.
But I’m curious, how are others handling this?
Specifically:
- Are you combining multiple resilience libraries, and if so, how do you coordinate them?
- Do you use any patterns for shared circuit breaker state across multiple functions calling the same service?
- Is anyone using retry budgets to prevent retry storms across a service?
Would love to hear what’s working (or not working) for people.