What are the drawbacks of using the Chain of Responsibility pattern?

The Chain of Responsibility pattern has several drawbacks that show up as chains grow longer or less disciplined. Because a request travels through handlers sequentially until one accepts it, the pattern trades explicit control flow for flexibility, which introduces performance, debugging, and reliability costs.

Key Points: • Requests may traverse many handlers before being processed, adding latency versus a direct call or lookup. • Debugging is harder because it is not obvious at a glance which handler in the chain will ultimately process a given request. • A request can silently go unhandled if the chain is misconfigured or no handler matches, unless a default handler is added. • Chain order matters and is easy to get wrong, since handlers are often configured externally (e.g., during setup) rather than enforced by the compiler. • Each handler needs a reference to the next one, which adds bookkeeping and makes the chain's structure less visible than a single dispatch method.

Interview Tip: A concise interview answer is:

"The main downsides are performance, since a request may pass through several handlers before it's handled, and debuggability, since it's not obvious which handler will act. There's also a real risk of a request falling through the whole chain unhandled unless you add a default handler, and chain ordering is easy to misconfigure."