Bird
0
0

Why is Redis preferred as a message broker over a traditional relational database in Django applications using Celery?

hard📝 Conceptual Q10 of 15
Django - Celery and Background Tasks
Why is Redis preferred as a message broker over a traditional relational database in Django applications using Celery?
ARelational databases cannot store any messages
BRedis automatically retries failed tasks without configuration
CRedis provides fast in-memory data storage optimized for message passing
DRelational databases are not supported by Celery
Step-by-Step Solution
Solution:
  1. Step 1: Compare Redis and relational DB for messaging

    Redis is in-memory and optimized for fast message passing; relational DBs are slower for this.
  2. Step 2: Check other options

    Relational DBs can store messages but are slower; Redis does not auto-retry tasks; Celery supports DB brokers but less efficient.
  3. Final Answer:

    Redis provides fast in-memory data storage optimized for message passing -> Option C
  4. Quick Check:

    Redis speed and design make it ideal message broker [OK]
Quick Trick: Redis is fast in-memory store ideal for messaging [OK]
Common Mistakes:
MISTAKES
  • Thinking relational DBs can't store messages
  • Assuming Redis auto-retries tasks
  • Believing Celery doesn't support DB brokers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes