You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to address this issue but i have a few questions first, on the source that you provide there are a few things that i need more opinion about.
The parameter last_failure_time
I was thinking that we can use the TTL value from the request_cache_key, this way we can compare this TTL value with the parameter circuit_timeout or we add a new parameter to use this value on a different cache key.
The half-open state
The source text suggest two approaches:
Set the half-open state when the current state is open and a time is reached, example:
The circuit is open and it has been open for 1 minute, now we can "try" to call the method again, this would change the circuit to half-open, if the request succeed we close the circuit, otherwise we keep it open.
Set the half-open state based on the percentage of errors:
A more sophisticated approach might look at frequency of errors, tripping once you get, say, a 50% failure rate.
This one is a little confuse to me, it says that the half-open state will be use when the errors percentage reach 50%, this means that the we will only try 50% of the requests on purpose and fail the remain 50%?
About the implementation of this percentage errors, it will only available on the PercentageFailuresRule class? or we need to implement it for every rule?
To follow the Nygard circuit breaker pattern we need to create the half-open state on the circuit breaker. :
source
The text was updated successfully, but these errors were encountered: