Bird
0
0

What is the main role of Redis when used as a message broker in a Flask application?

easy📝 Conceptual Q11 of 15
Flask - Background Tasks
What is the main role of Redis when used as a message broker in a Flask application?
ATo serve static files like images and CSS
BTo store user passwords securely
CTo send and receive messages between different parts of the app
DTo handle HTTP requests directly
Step-by-Step Solution
Solution:
  1. Step 1: Understand Redis as a message broker

    Redis acts as a middleman to send messages between parts of an app, enabling communication.
  2. Step 2: Identify Redis's role in Flask

    It is not used for storing passwords, serving files, or handling HTTP requests directly.
  3. Final Answer:

    To send and receive messages between different parts of the app -> Option C
  4. Quick Check:

    Redis message broker = send/receive messages [OK]
Quick Trick: Redis in Flask is for messaging, not storage or HTTP [OK]
Common Mistakes:
MISTAKES
  • Confusing Redis with a database for user data
  • Thinking Redis serves static files
  • Assuming Redis handles HTTP requests

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes