3 ms·
If and only if you can guarantee that connection will eventually be restored at all, which you can't. Also there is a maximum amount of retries in practice, bec
by WJW 5y ago
If and only if you can guarantee that connection will eventually be restored at all, which you can't. Also there is a maximum amount of retries in practice, because either you put in a maximum retry count yourself or eventually your users will close the tab/shutdown their computer/etc. (Also in real life, if you keep retrying indefinitely when the networks unborks itself you will have a massive thundering herd of retrying clients waiting to hammer your system and some requests can easily be lost in the resulting frackas)
More specifically, retrying can only establish exactly-once request processing semantics if you have infinite time to do so.
- easrng 5y agoTo avoid the thundering herd use an exponential backoff with some jitter.