3 ms·
This is "at most once", not "exactly once". You aren't guaranteeing things will process or even reach the server.
by robertlagrant 5y ago
This is "at most once", not "exactly once". You aren't guaranteeing things will process or even reach the server.
- wereHamster 5y agoA single such request (as outlined by the article) gives you "at most once". But retrying the request until you you get a successful response gives you "exactly once". If I may quote the first paragraph: > Achieving suppression together with client retries establishes exactly-once request processing semantics in the system.
- WJW 5y agoIf 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.