Start here. This is the direct spoken answer to practice first.
Overview
Coordinates admission stop, task cancellation or draining, resource closure, and bounded termination.
I first stop accepting new work, then signal the components that own producers and long-running tasks. Work that can finish within the shutdown budget is drained; remaining cooperative tasks are cancelled and awaited so cleanup and exceptions are observed. Only after task use has ended do I close clients, pools, streams, and the event loop. Shutdown itself has a deadline so deployment cannot hang forever.