-
Notifications
You must be signed in to change notification settings - Fork 2
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
adapt increasing gap in retry policy #3
Comments
Could we reduce the token service recovery time, instead of increasing the token error retry timeout? i.e. Is there any way to make the token service recover instantly when it has to be restarted? |
Actually for most cases the token will recover in time. But there is exceptions. When we talk about this problem, @windmemory believes we should allow about 5 minutes recover time. |
Good to know that!
So we are talking about an edge case of the timeout, which I believe it should be thrown as an error as soon as possible? |
I'd like to introduce a typical scenario: |
Thanks for sharing your use case! I felt a Deja Vu for this process ... @lijiarui Can we start the updated container first before we shutdown the old one, so that we can switch to the new one right after we stop the old one? |
It's really hard to time how long should we stop the old container after the new one started. The time between starting a wecom client can be as short as 10s and as long as. 60s. If two wecom instances for one account run at the same time, there might be some weird problems. |
This also relate to the problem: should we retry when we get 404 response? I think we should at least retry for a short while, since as I mentioned before, upgrade server version will cause 404 in discover-service for some time/ |
Current resolve policy will retry 3 times with a 15s gap, the time for the token to resume is too short.
I suggest we add more retries with increasing time gap e.g. 5s, 8s, 13s, 21s, 34s, like a fibonacci sequence.
Since for now a token in a error state (e.g. restarting) is the same to discover service as an invalid token, it is necessary to allow more times for the token to recover.
The text was updated successfully, but these errors were encountered: