[HN Gopher] Graceful Shutdown in Go: Practical Patterns
       ___________________________________________________________________
        
       Graceful Shutdown in Go: Practical Patterns
        
       Author : mkl95
       Score  : 25 points
       Date   : 2025-05-04 21:09 UTC (1 hours ago)
        
 (HTM) web link (victoriametrics.com)
 (TXT) w3m dump (victoriametrics.com)
        
       | wbl wrote:
       | If a distribute system relies on clients gracefully exiting to
       | work the system will eventually break badly.
        
         | smcleod wrote:
         | Way back when, in physical land - I used STONITH for that!
         | https://smcleod.net/2015/07/delayed-serial-stonith/
        
         | XorNot wrote:
         | There's valid reasons to want the typical exit not to look like
         | a catastrophic one even if that's a recoverable situation.
         | 
         | That my application went down from sig int makes a big
         | difference compared to kill.
         | 
         | Blue-Green migrations for example require a graceful exit
         | behavior.
        
           | shoo wrote:
           | > Blue-Green migrations for example require a graceful exit
           | behavior.
           | 
           | it may not always be necessary. e.g. if you are deploying a
           | new version of a stateless backend service, and there is a
           | load balancer forwarding traffic to current version and new
           | version backends, the load balancer could be responsible for
           | cutting over, allowing in flight requests to be processed by
           | the current version backends while only forwarding new
           | requests to the new backends. then the old backends could be
           | ungracefully terminated once the LB says they are not
           | processing any requests.
        
         | ikiris wrote:
         | There's a big gap between graceful shutdown to be nice to
         | clients / workflows, and clients relying on it to work.
        
       ___________________________________________________________________
       (page generated 2025-05-04 23:00 UTC)