This is a beginer question, but I am having trouble understanding the abstraction between Gunicorn and Nginx. I am not looking for a detailed answer, just at a high level what is the role that each plays? How do they interact?
Per Gunicorn's deploy doc, my understanding is that you use Nginx as a proxy server for Gunicorn.
As Gunicorn is ported from Ruby's Unicorn, I'm assuming the limitations and specifications of Unicorn apply to Gunicorn as well:
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the request and response in between Unicorn and slow clients.
Gunicorn's deploy doc says much the same thing:
Although there are many HTTP proxies available, we strongly advise that you use Nginx. If you choose another proxy server you need to make sure that it buffers slow clients when you use default Gunicorn workers. Without this buffering, Gunicorn will be easily susceptible to denial-of-service attacks.
So Gunicorn serves fast, low-latency high-bandwidth clients and Nginx serves the rest.