Run Flask Under Gunicorn
Serve the app with multiple workers.
What Gunicorn Is
Gunicorn is a production WSGI server for Python. It runs your Flask app across multiple worker processes so many users can be served at once. 🦄
Install It
Add Gunicorn to your environment with pip. Treat it as a real dependency and pin it in your requirements file.
pip install gunicornAll lessons in this course
- Why Not the Built-in Dev Server
- Run Flask Under Gunicorn
- Write a Production Dockerfile
- Front It with Nginx and Compose