Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't cascade reconnect requests on cascading failures
The way the SerialFallbackProvider's fallback logic was written, if 8 requests came in while a provider had recently closed, the requests would all trigger reconnects, cascading through any fallback providers and ultimately creating a storm of reconnects. Across multiple serial fallback providers, the problem was magnified, creating a tremendous volume of connection/reconnection loops when one provider failed. Some very light tweaks now check for whether there's already a retry/reconnect in progress. If such a reconnect is happening, the request is retried on the new provider. If such a reconnect has not yet been initiated, it is triggered. This ensures only one reconnect is being attempted at the same time. Still missing is any sort of backoff if all providers fail.
- Loading branch information