What is the purpose of NGINX and Gunicorn running in parallel?

前端 未结 2 973
生来不讨喜
生来不讨喜 2021-01-30 10:12

A lot of Django app deployments over Amazon\'s EC2 use HTTP servers NGINX and Gunicorn.

I was wondering what they actually do and why both are used in parallel. What is

2条回答
  •  鱼传尺愫
    2021-01-30 10:51

    Nginx and Gunicorn are not used in parrallel.

    • Gunicorn, is a Web Server Gateway Interface (WSGI) server implementation that is commonly used to run Python web applications.
    • NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.
    • Nginx responsible for serving static content, gzip compression, ssl, proxy_buffers and other HTTP stuff.While gunicorn is a Python HTTP server that interfaces with both nginx and your actual python web-app code to serve dynamic content.

    The following diagrams shows how nginx and Gunicorn interact.

提交回复
热议问题