Should I restart both nginx and gunicorn when upgrading production?

What is the best practice when I have an update for my Django application introduced in my production? Should I restart services gunicornand nginxusing

sudo service gunicorn restart
sudo service nginx restart

or is restarting just gunicornenough? Finally, does the restart order matter, if I need to perform both restarts? Thanks!

+4
source share
1 answer

It all depends on how you set up your box.

, , . , requirements.txt release. gunicorn , ( supervisord supervisord.conf) .

vginx nginx, gunicorn, , , nginx. , , . - , nginx, , , .

Ansible script, Fabric, - : https://medium.com/@healthchecks/deploying-a-django-app-with-no-downtime-f4e02738ab06

, , , , nginx, . , .

+1

Source: https://habr.com/ru/post/1620221/


All Articles