WAF Competing Consumers Pattern

July 29, 2025259 words2 min read
azure
design patterns
reliability
cost optimization
performance efficiency

WAF Competing Consumers Pattern

CategoryDescriptionWAF Description
WhatA 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 withMessage-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.
WhenWhen 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 ForScenarios 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 ToQueue-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.

If you want to get in touch and hear more about this topic, feel free to contact me on or via .

© 2025 Andrei Bodea