Systemd & Zero-Downtime Reloads
Systemd Service Management
The .deb and .rpm packages ship naati.service (and nginx.service when naati-nginx-compat is installed), pre-configured with ExecStartPre validation, SIGHUP reload, SIGQUIT stop, and LimitNOFILE=65535:
sudo systemctl enable --now naati
sudo systemctl reload naati # sends SIGHUP (run naati -t first; master validates before switching)
sudo systemctl stop naati # graceful SIGQUIT drainZero-Downtime Configuration Reload (SIGHUP)
When you run naati -s reload (or kill -HUP <master-pid>):
- The master parses and validates the new configuration before applying it.
- If the new config has an error, the reload is aborted safely and existing workers keep serving traffic untouched.
- On success, new workers spawn with the updated config while old workers gracefully drain in-flight requests and exit.
Log Rotation (SIGUSR1)
After rotating access.log or error.log (for example via logrotate), run naati -s reopen (or kill -USR1 <master-pid>) so master and workers reopen log file descriptors cleanly without interrupting traffic.
Binary Upgrades
In-place
SIGUSR2 / SIGWINCH live binary upgrade (.oldbin pidfile and NGINX socket inheritance) is planned on the roadmap. Today, upgrade the binary using rolling container/host restarts with graceful SIGQUIT draining (systemctl restart naati or Kubernetes rolling updates).