Quicksort is a sorting method that uses a divide-and-conquer algorithm. The basic idea is to pick an element as a pivot. Put another smaller member than the pivot to its left side, and put another larger member than the pivot to its right side. After this process, we can make sure that the pivot is in the correct position. There are many different versions of quicksort that pick pivot in different ways².
…
The purpose of a graceful shutdown is to make a go application stop receiving new requests while completing the ongoing request before finally going to shutdown. That usually happens when rolling update pods. The old pods will terminate after new pods are ready.
Usually, the pod will terminate after receiving the OS interrupt signal. To achieve graceful shutdown, we can create a context
with a cancel
callback and a built-in shutdown method provided by http.Server
interface. …
Asgardian software engineer