Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
What is the purpose of using nginx with gunicorn?

I want to use gunicorn for a REST API application with Flask/Python. What is the purpose of adding nginx here to gunicorn? The gunicorn site recommends using gunicorn with nginx.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Nginx has some web server functionality (e.g., serving static pages; SSL handling) that gunicorn does not, whereas gunicorn implements WSGI (which nginx does not).

... Wait, why do we need two servers? Think of Gunicorn as the application web server that will be running behind nginx – the front- facing web server. Gunicorn is WSGI-compatible. It can talk to other applications that support WSGI, like Flask or Django.

Source: https://realpython.com/blog/python/kickstarting-flask-on-ubuntu-setup-and-deployment/

over 4 years ago · Santiago Trujillo Report

0

Nginx is a reverse proxy for Gunicorn. Gunicorn serves your Flask app and Nginx sits in front of it and decides where a request should go. For example, if the incoming request is an http request Nginx redirects it to gunicorn, if it is for a static file, it serves it itself. Read more about how to use Nginx and Gunicorn and how to deploy them starting from here.

over 4 years ago · Santiago Trujillo Report

0

Gunicorn is an application server for running your python application instance.

NGINX is a reverse proxy. It accepts incoming connections and decides where they should go next. It is in front of Gunicorn.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!