NANDHOO
.
Learning Paths
Dashboard
Sign In
Home
Dashboard
Flask Framework Engineering
Deployment & Production Engineering
Quiz
Chapter Quiz: Deployment & Production Engineering
Mastery Assessment: Deployment
Complete this assessment with 100% score to master this chapter.
01
In a production environment, why is Nginx placed in front of Gunicorn?
Gunicorn cannot route URLs.
Nginx acts as a Reverse Proxy to handle SSL termination, serve static files directly, and buffer slow clients, freeing Gunicorn to only process Python code.
Nginx automatically writes the Python code.
Gunicorn only runs on Windows.
02
When should you use Gunicorn's 'gevent' or 'eventlet' workers instead of the default 'sync' workers?
When your application does a lot of heavy mathematical calculations.
When your application is I/O-bound, meaning it spends a lot of time waiting for external APIs, database queries, or long-lived WebSocket connections.
To make the Python code more readable.
To use less memory on the server.
03
Why is it critical to set `DEBUG = False` in a production environment?
It makes the application slightly slower.
Debug mode enables a debugger that allows anyone to execute arbitrary Python code on your server if an error occurs, posing a catastrophic security risk.
It changes the color of the log messages.
It is a recommendation from the Python Software Foundation.
Submit Answers
Back to Lesson
Return to Syllabus