Bird
0
0

Why is it recommended to separate Celery worker processes from the Flask web server?

hard📝 Conceptual Q10 of 15
Flask - Background Tasks
Why is it recommended to separate Celery worker processes from the Flask web server?
ATo avoid blocking web requests and improve scalability
BBecause Celery cannot run in the same Python environment
CTo reduce memory usage by sharing resources
DBecause Flask automatically disables Celery in the same process
Step-by-Step Solution
Solution:
  1. Step 1: Understand process roles

    Flask handles web requests; Celery workers handle background tasks separately.
  2. Step 2: Identify benefits of separation

    Separating workers avoids blocking Flask requests and allows scaling workers independently.
  3. Final Answer:

    To avoid blocking web requests and improve scalability -> Option A
  4. Quick Check:

    Separate processes improve responsiveness and scalability [OK]
Quick Trick: Run Celery workers separately to keep Flask responsive [OK]
Common Mistakes:
MISTAKES
  • Thinking Celery can't share Python environment
  • Assuming Flask disables Celery automatically
  • Believing separation reduces memory usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes