Concept Flow - Graceful shutdown handling
Start Server
Server Running
Receive Shutdown Signal
Stop Accepting New Requests
Finish Ongoing Requests
Close Server & Cleanup
Exit Process
The server starts and runs normally until it receives a shutdown signal, then it stops new requests, finishes ongoing ones, cleans up, and exits.