Facebook Pixel
Updating Nginx Without Downtime Zero-Downtime Configuration Changes

When should I use restart instead of reload?

The answer

Only when Nginx is completely stuck and reload doesn't work, after installing a new Nginx module, or after a system upgrade. Restart causes a brief downtime as all connections are dropped. For routine config changes, always use reload.

More FAQs in Updating Nginx Without Downtime Zero-Downtime Configuration Changes

Use sudo systemctl reload nginx (not restart). Reload starts new worker processes with the new config while old workers finish their current requests. No connections are dropped. Always test with nginx -t first, and back up the config before changes.

Reload: master reads new config, starts new workers, old workers finish requests and shut down. Zero downtime. Restart: stops and starts Nginx. All active connections dropped. Brief downtime. Always use reload for config changes in production.

Master receives SIGHUP, reads new config, starts new workers with new config, sends shutdown signal to old workers, old workers stop accepting new connections but finish current requests, old workers shut down, new workers handle all traffic. Takes milliseconds.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Your learning library

Small steps. Big possibilities.

Find your next course. Build something great.

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.