dimanche 8 novembre 2015

Nginx + Gunicorn deployment setup

about to deploy an Python web app and I would like to get the feedback about how to setup Ngxin + gunicorn

probably an easy option would be to deploy to Ngxin and gunicorn on same server make things much easier to spin up a new instance no need to change Nginx or gunicorn configuration since both refer to localhost port/pipe for proxy traffic , example using AWS autoscaling

if kept separate a new Nginx must know the exact machine address to proxy traffic and make autoscaling a bit more complicated.

questions:

  • what are you takes on the two setups?
  • what is the best combination of number of gunicorn worker processes vs nginx vs server cores once on same machine?
  • scale horizontally vs vertically when more gunicorn processes are needed?
  • how do you know that more gunicorn processes are needed to proxy the nginx traffic?



Aucun commentaire:

Enregistrer un commentaire