Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is Circuit Breaker State stored? #259

Closed
nareshkhatri81 opened this issue Jun 14, 2017 · 3 comments
Closed

Where is Circuit Breaker State stored? #259

nareshkhatri81 opened this issue Jun 14, 2017 · 3 comments

Comments

@nareshkhatri81
Copy link

Hi Team,
i would like to know where Circuit Breaker state is stored.
is it stored in memory ?
is it possible to extend that and store it in external storage like redis ?
i have multiple containers running and if one container has tried calling service and it has tripped the circuit then i don't want other containers to call the service again which is tripped already by one container till circuit is opened again ?

Thanks,
Naresh Khatri

@reisenberger
Copy link
Member

reisenberger commented Jun 15, 2017

Hi @nareshkhatri81 . Thank you for your interest in Polly! CircuitState is stored in memory.

See #215 for discussion of external storage for Circuit Breaker State - let us know what you think!

One issue that has concerned me, with just saving the circuit state in eg Redis, is that it could lead to the "single bad node poisons other good nodes" problem discussed here, if the problem is in fact with the upstream node rather than the downstream system.

If that does occur - if the problem is in fact only with that single upstream node, but the shared storage 'applies' the problem also to the sibling upstream nodes - this effectively writes off the value of having the other horizontally-scaled nodes. Thus, discussion for implementing a distributed circuit breaker in Polly has tended towards (/I haven't wanted to implement it without) a quorum-driven approach: break locally if any >=N upstream nodes in the distributed circuit have broken.

Do you think the quorum aspect is important, or am I over-egging this?

@reisenberger reisenberger changed the title Circuit Breaker State Where is Circuit Breaker State stored? Jun 15, 2017
@reisenberger
Copy link
Member

Proposal for DistributedCircuitBreaker now posted as #287

@reisenberger
Copy link
Member

Closing as duplicate, main discussion now on #287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants