Producer-consumer patterns are used extensively in systems all around us. In producer-consumer pattern-based systems, producers write data that one or multiple consumers consume. This pattern allows producer systems to scale while distributing functionality among multiple consumer systems. Just like any other distributed system, the uptime of a producer-consumer system depends on how well it protects itself from the various failure modes and, when impacted, how quickly it can recover.
In this article, we analyze the various failure modes of producer-consumer systems, their impact, how we can detect the failures, mitigate them, and review the protections we can put in place to prevent the failure modes from happening.