-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description:
Introduce a new administrative HTTP route POST /shutdown to allow an authorized client to request a graceful server shutdown. When invoked, the server should:
• Acknowledge the request (preferably 202 Accepted) before shutting down.
• Stop accepting new connections/requests.
• Let in-flight requests complete (or enforce a configurable timeout).
• Flush logs, close sockets, and release resources cleanly.
• Terminate the process or exit the main event loop.
Security constraints:
This endpoint must be protected to avoid accidental/unauthorized shutdown (e.g., localhost-only, or require an admin token via Authorization: Bearer ). It should also be idempotent: repeated calls while shutting down return a clear “already shutting down” response rather than re-triggering shutdown logic.