Bird
0
0

You want to deploy a Flask app with Gunicorn behind Nginx. Which Gunicorn option helps you gracefully reload workers without downtime?

hard📝 Application Q8 of 15
Flask - Performance Optimization
You want to deploy a Flask app with Gunicorn behind Nginx. Which Gunicorn option helps you gracefully reload workers without downtime?
ASending the HUP signal to Gunicorn master process
BRestarting Gunicorn with the --reload flag
CUsing the --daemon flag to run in background
DSetting workers to 1 to avoid conflicts
Step-by-Step Solution
Solution:
  1. Step 1: Understand graceful reload in Gunicorn

    Sending the HUP signal tells Gunicorn to reload workers gracefully without dropping connections.
  2. Step 2: Differentiate from other options

    The --reload flag is for development and restarts on code changes but not graceful reload in production.
  3. Final Answer:

    Sending the HUP signal to Gunicorn master process -> Option A
  4. Quick Check:

    Graceful reload = HUP signal [OK]
Quick Trick: Use HUP signal to reload Gunicorn workers gracefully [OK]
Common Mistakes:
MISTAKES
  • Confusing --reload with graceful reload
  • Thinking --daemon controls reload behavior
  • Reducing workers to 1 for reload

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes