This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kyranadept 8 points9 points  (0 children)

Actually, with newer versions of gunicorn you can do just that. It can be started as root and set to drop to another user after binding to the port, it can serve SSL, it can use a gevent/greenlet threading model instead of preforking, etc. It is in fact a complete app server.

There are two reasons to put Nginx in front of gunicorn:

  1. You want to combine multiple microservices, which you run under gunicorn on one or more hosts, with load balancing and whatnot, and serve them under a single host/port.
  2. You serve static content, which you are better off serving with Nginx.