WAF Competing Consumers Pattern
July 29, 2025•259 words•2 min read•
azure
design patterns
reliability
cost optimization
performance efficiency
Category | Description | WAF Description |
---|---|---|
What | A pattern where multiple independent consumer instances pull messages from a shared queue, allowing for parallel processing and improved throughput. | Enhances performance efficiency and scalability by distributing load across consumers and enabling horizontal scaling to handle varying workloads. |
Used with | Message-based systems like order processing, telemetry ingestion, and task queues where work can be distributed across multiple workers. | Supports performance and operational excellence by decoupling producers and consumers, making the system more elastic and easier to scale. |
When | When the workload increases and processing needs to scale out, or when you want to improve system resilience by removing a single processing bottleneck. | Helps achieve reliability by allowing redundant consumers and isolating failures to individual instances, reducing the impact of any single consumer failure. |
Not Suitable For | Scenarios requiring strict message ordering or transactional consistency across multiple consumers. | May affect reliability and correctness if order-sensitive logic is involved, unless additional mechanisms are implemented to preserve message sequence or concurrency control. |
Related To | Queue-Based Load Leveling, Event-Driven Architecture, Message Broker, Autoscaling. | Compute Resource Consolidation pattern, Queue-Based Load Leveling pattern. |
A basic implementation of the Competing Consumers Pattern can be found here.
The full WAF description of the pattern can be found here.