News for hackers. Stuff that matters.
Re:How I write HTTP services in Go after 13 years by hyeomans on Saturday February 10, 2024 @08:38AM (#39326040)
I find your first point interesting, wouldn’t be that solved by context propagation and waiting for the server to shutdown? Thanks!
Re:How I write HTTP services in Go after 13 years by liampulles on Saturday February 10, 2024 @09:12PM (#39332084)
If you just have a context, than your app cannot kill itself and the environment has to do it. That is better than nothing, but having the app do the killing is advantageous because: A) it can die faster (and so you can e.g. do your blue-green rollout faster) and B) you can write a log to say that your app is finished shutting down all its components, which can be useful for troubleshooting if your app was mid-transaction when it was killed.