Bird
0
0

Given the command gunicorn --workers 2 myproject.wsgi:application, what will happen if the server receives 5 simultaneous requests?

medium📝 component behavior Q4 of 15
Django - Deployment and Production
Given the command gunicorn --workers 2 myproject.wsgi:application, what will happen if the server receives 5 simultaneous requests?
AGunicorn will handle 2 requests concurrently and queue the rest
BGunicorn will crash due to too many requests
CGunicorn will spawn 5 workers automatically
DGunicorn will reject all requests beyond 2
Step-by-Step Solution
Solution:
  1. Step 1: Understand Gunicorn workers

    Gunicorn creates the specified number of worker processes (2 here) to handle requests concurrently.
  2. Step 2: Behavior on excess requests

    Requests beyond workers are queued until a worker is free; Gunicorn does not crash or reject automatically.
  3. Final Answer:

    Gunicorn will handle 2 requests concurrently and queue the rest -> Option A
  4. Quick Check:

    Gunicorn workers = concurrent handlers [OK]
Quick Trick: Workers handle requests concurrently; extras wait in queue [OK]
Common Mistakes:
MISTAKES
  • Assuming Gunicorn crashes on overload
  • Thinking Gunicorn auto-spawns workers
  • Believing requests get rejected immediately

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes