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
which on first fail usually invalidate connection object. That means all subsequent calls will definitely fail even if connectivity to service in question was restored.
which will defeat the problem, but not very effective in terms of resources, and actually will create new one: Under high load connections will be opened faster than closed by garbage collector, that could cause problems, like "Maximum number of connections reached" which can make actual downtime (Happened to redis server once for me).
So is there a proper way to re-use a connection object, but create new one (ie reset it) when circuit breaker goes to half open state?
Given we have a
connection
object, that could raise someConnectionError
documented usage ofsimple_circuit_breaker
would be:which on first fail usually invalidate
connection
object. That means all subsequent calls will definitely fail even if connectivity to service in question was restored.One solution one can consider is:
which will defeat the problem, but not very effective in terms of resources, and actually will create new one: Under high load connections will be opened faster than closed by garbage collector, that could cause problems, like "Maximum number of connections reached" which can make actual downtime (Happened to redis server once for me).
So is there a proper way to re-use a connection object, but create new one (ie reset it) when circuit breaker goes to half open state?
Probably something along these lines:
WDYT?
The text was updated successfully, but these errors were encountered: