Bird
Raised Fist0

Why might the Chain of Responsibility pattern lead to performance issues in a system with a very long chain of handlers?

hard🧠 Conceptual Q10 of Q15
LLD - Behavioral Design Patterns — Part 1
Why might the Chain of Responsibility pattern lead to performance issues in a system with a very long chain of handlers?
ABecause each request may traverse many handlers before being processed, increasing latency.
BBecause all handlers process every request in parallel, causing resource contention.
CBecause the pattern requires duplicating handlers for each request.
DBecause the pattern forces synchronous blocking calls in all handlers.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze chain traversal impact

    Requests may pass through many handlers sequentially before being handled, increasing processing time.
  2. Step 2: Evaluate other options

    Options B, C, and D describe behaviors not inherent to the pattern or incorrect assumptions.
  3. Final Answer:

    Because each request may traverse many handlers before being processed, increasing latency. -> Option A
  4. Quick Check:

    Long chains increase latency due to sequential traversal [OK]
Quick Trick: Long chains cause latency due to sequential processing [OK]
Common Mistakes:
MISTAKES
  • Assuming parallel processing in chain
  • Thinking handlers duplicate per request
  • Confusing pattern with blocking calls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes