Performance: Nginx as reverse proxy
MEDIUM IMPACT
This affects server response time and page load speed by efficiently managing client requests before they reach the Flask app.
Use Nginx as reverse proxy forwarding requests to Flask app running with Gunicorn or uWSGI
flask_app.run(host='0.0.0.0', port=5000, debug=False)
| Pattern | Server Load | Response Time | Concurrency Handling | Verdict |
|---|---|---|---|---|
| Flask built-in server only | High under load | Slow with many users | Poor concurrency | [X] Bad |
| Nginx reverse proxy + Gunicorn/uWSGI | Balanced and efficient | Fast response | Handles many connections well | [OK] Good |