Why Graceful Shutdown Matters in Kubernetes

Have you ever deployed a new version of your app in Kubernetes and noticed errors briefly spiking during rollout? Many teams do not even realize this is happening, especially if they are not closely monitoring their error rates during deployments. There is a common misconception in the Kubernetes world that bothers me. The official Kubernetes documentation and most guides claim that “if you want zero downtime upgrades, just use rolling update mode on deployments”. I have learned the hard way that this simply it is not true - rolling updates alone are NOT enough for true zero-downtime deployments. And it is not just about deployments. Your pods can be terminated for many other reasons: scaling events, node maintenance, preemption, resource constraints, and more. Without proper graceful shutdown handling, any of these events can lead to dropped requests and frustrated users. In this post, I will share what I have learned about implementing proper graceful shutdown in Kubernetes. I will show you exactly what happens behind the scenes, provide working code examples, and back everything with real test results that clearly demonstrate the difference. ...

Unintended Side Effects of Using http.DefaultClient in Go

The Internet is plenty of articles that telling why you should not be using http.DefaultClient in Golang (one, two) but they refer to Timeout and MaxIdleConns settings. Today I want to share with you another reason why you should avoid using http.DefaultClient in your code. ...

Go Quickstart

Hi folks! It’s been a long time since I have published the last post, but now I came back with short quickstart guide in Go. In this tutorial, we will configure Go environment in VS Code and write our first program in Go. ...