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

Should current_state respect reset_timeout? #15

Open
phillbaker opened this issue May 18, 2017 · 1 comment
Open

Should current_state respect reset_timeout? #15

phillbaker opened this issue May 18, 2017 · 1 comment

Comments

@phillbaker
Copy link
Contributor

We currently monitor the state of several circuit breakers via the current_state attribute. However, we've noticed that if some of these connections have spiky traffic and trip the breaker, they can stay in the open state until another request is made which clears the state.

The breaker itself is operating as expected, however, our monitoring records in correct data. What do you think of including a check of _state_storage.opened_at in current_state? We're including this check in our code currently, but if this behavior at the library level seems incorrect I can open a PR.

@danielfm
Copy link
Owner

Whether this behavior is correct can be questioned, but it surely is expected; since the circuit only opens and closes as response to succeeded/failed calls, if there are no calls, the circuit will stay in its current state.

I think it won't hurt to add the opened_at metadata, but I wouldn't change the circuit state based on this information.

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

No branches or pull requests

2 participants