Bird
0
0

Why is Redis preferred as a message broker over a traditional database in Flask applications?

hard📝 Conceptual Q10 of 15
Flask - Background Tasks
Why is Redis preferred as a message broker over a traditional database in Flask applications?
ABecause Redis stores messages permanently for audit trails
BBecause Redis automatically scales Flask routes
CBecause Redis operates in-memory, providing low latency for message passing
DBecause Redis replaces Flask's template engine
Step-by-Step Solution
Solution:
  1. Step 1: Compare Redis and traditional databases for messaging

    Redis stores data in memory, making message passing very fast and low latency.
  2. Step 2: Evaluate other options

    Redis does not scale Flask routes, does not store messages permanently by default, and does not handle templates.
  3. Final Answer:

    Because Redis operates in-memory, providing low latency for message passing -> Option C
  4. Quick Check:

    Redis speed comes from in-memory operation [OK]
Quick Trick: Redis is fast because it uses memory, not disk [OK]
Common Mistakes:
MISTAKES
  • Thinking Redis scales Flask routing
  • Assuming Redis stores messages permanently
  • Confusing Redis with template engines

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes