There’s an excellent article talking about how to do graceful shutdown in Kubernetes here that we used to explain to people developing services how to implement graceful shutdown, the differences between “readiness” and “liveness” probes and about signal handling and IPC.
While it’s an excellent article, to be honest, I never got around to trying it out until today.
The results were as expected, though I did hit one issue where something would sporadically reset the TCP connection:
Benchmarking 192.168.99.100 (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests apr_socket_recv: Connection reset by peer (54) Total of 20055 requests completed
I haven’t verified it, but I think this might be something to do with the Minikube networking implementation. The issue only came up when I was running the benchmark tests during the deploy.