[HN Gopher] Suppressing duplicate requests in web services
       ___________________________________________________________________
        
       Suppressing duplicate requests in web services
        
       Author : tkareine
       Score  : 20 points
       Date   : 2021-12-24 10:29 UTC (1 days ago)
        
 (HTM) web link (tkareine.org)
 (TXT) w3m dump (tkareine.org)
        
       | adamfeldman wrote:
       | One of a few past, great HN threads on implementing idempotency -
       | 
       | Implementing Stripe-Like Idempotency Keys in Postgres
       | https://news.ycombinator.com/item?id=15569478
        
       | robertlagrant wrote:
       | This is "at most once", not "exactly once". You aren't
       | guaranteeing things will process or even reach the server.
        
         | wereHamster wrote:
         | A 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 wrote:
           | 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.
        
       ___________________________________________________________________
       (page generated 2021-12-25 23:01 UTC)