Bird
0
0

You are designing a scalable event-driven system for a social media app. Which approach best improves scalability and fault tolerance?

hard📝 Trade-off Q15 of 15
LLD - Advanced LLD Concepts
You are designing a scalable event-driven system for a social media app. Which approach best improves scalability and fault tolerance?
AStore all events in a database and process them synchronously
BUse a distributed message queue with multiple consumers processing events in parallel
CUse a single queue and one consumer to ensure event order
DSend events directly from producer to consumer without queue
Step-by-Step Solution
Solution:
  1. Step 1: Understand scalability and fault tolerance needs

    Social media apps have high event volume; parallel processing and fault tolerance are key.
  2. Step 2: Evaluate options for scalability

    Distributed queues with multiple consumers allow load balancing and fault tolerance. Single consumer limits throughput. Synchronous processing blocks system. Direct send lacks buffering and fault tolerance.
  3. Final Answer:

    Use a distributed message queue with multiple consumers processing events in parallel -> Option B
  4. Quick Check:

    Distributed queues + parallel consumers = scalable & fault tolerant [OK]
Quick Trick: Parallel consumers on distributed queue scale best [OK]
Common Mistakes:
  • Choosing single consumer limits throughput
  • Ignoring asynchronous processing benefits
  • Skipping queue leads to lost events

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes