Lifecycle + Ops: Hot Reload, Restart, Graceful Close

Lifecycle + Ops: Hot Reload, Restart, Graceful Close

This chapter focuses on operability: how changes take effect, how to recover, and how to shut down cleanly.

What to make explicit

  • classify changes: hot reload / restart / noop
  • defer restarts until idle (with a timeout policy)
  • make restarts user-visible via a handoff/sentinel mechanism
  • close in a stable order (stop inputs, broadcast shutdown, then close servers)

Useful docs:

Code entry points (optional)

  • src/gateway/config-reload.ts
  • src/infra/restart.ts
  • src/gateway/server-close.ts