AWS recently introduced so-called fair queues for its Amazon Simple Queue Service (SQS), a feature that mitigates the impact of noisy neighbors in multi-tenant systems. The company describes the feature as enhancing the resiliency of applications and simplifying operations.
SQS is a fully-managed message queuing service in AWS that enables developers to decouple and scale microservices, distributed systems, and serverless applications with ease. The queues can act as buffers, allowing services to process work asynchronously and at their own pace. However, in a multi-tenant architecture, when one tenant becomes a noisy neighbor, it impacts others by overutilizing the provisioned system’s resources. The authors of an AWS Compute blog explain:
Regular queues deliver older messages first, which increases message dwell time for all tenants in such scenarios. Amazon SQS fair queues help maintain low dwell time for other tenants when there is a noisy neighbor. This happens transparently without requiring changes to your existing message processing logic. You define what constitutes a tenant in your system, and Amazon SQS handles the complex orchestration of mitigating noisy neighbor impact.
According to the documentation, when a single tenant significantly uses resources, Amazon SQS fair queues consider it a noisy neighbor and prioritize messages for other tenants. This ensures low dwell times for quieter tenants (B, C, D), while the dwell time for tenant A’s messages is higher until the backlog is cleared.
This new capability, as Chameera Dulanga, a technical lead at Enlear, highlights on LinkedIn, means developers now “get the best of both Standard and FIFO queues — high performance and group-level fairness — without complex refactoring.”
Further emphasizing the feature’s significance, Sidath Munasinghe, a senior tech lead at 99X, writes on LinkedIn:
Amazon SQS now supports fair queues — a powerful enhancement that tackles the classic “noisy neighbor” problem in multi-tenant environments. When one client floods a shared queue with heavy or long-processing messages, it can cause delays for others. With fair queues, SQS intelligently balances message flow across tenants, ensuring no single sender dominates and preserving consistent quality of service for everyone. The best part is that you can benefit from this feature by simply setting the message group ID.
(Source: AWS Compute blog post)
To get started with Amazon SQS fair queues, developers need to enable the feature by adding a tenant identifier (MessageGroupId) to their messages, which allows the new fairness capability to be applied automatically without changes to consumer code. Additionally, they can monitor the behavior of fair queues using Amazon CloudWatch metrics that distinguish between noisy and quiet message groups, thereby helping identify potential queue fairness issues. Contributor Insights can further aid in pinpointing specific tenants causing increased loads by analyzing application log output related to message processing.
While the “noisy neighbor” problem is a common challenge in multi-tenant cloud environments, AWS’s SQS Fair Queues introduce a direct, queue-level mechanism to mitigate its impact. Other major cloud providers, such as Microsoft Azure with Service Bus and Google Cloud with Pub/Sub, also offer solutions, although often through different architectural patterns or features. For instance, Azure Service Bus typically addresses noisy neighbors through strategies such as deploying separate queues or topics per tenant, leveraging premium tiers for stronger isolation with elastic scaling of Messaging Units, or using client-side rate limiting and partitioning for message affinity. Similarly, Google Cloud Pub/Sub, by design, offers automatic scaling and per-message parallelism that inherently helps distribute load and reduce the impact of a single high-volume producer. However, this differs from SQS Fair Queues’ explicit mechanism; unlike SQS’s method for deprioritizing noisy tenants to maintain low dwell times for quieter ones, these other platforms generally rely on more explicit architectural decisions or external controls by developers to ensure tenant fairness and prevent resource monopolization.
Lastly, developers who want to leverage fair queues in their multi-tenant solutions can review the Amazon SQS Developer Guide. Additionally, an example is available on GitHub.