Mitigate noisy-neighbor tenants in a multi-tenant SQS standard queue using fair queues

domain: docs.aws.amazon.com · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. Confirm you're using an SQS standard queue (not FIFO) — fair queues is a standard-queue capability that mitigates dwell-time impact from noisy tenants
  2. Have producers set MessageGroupId on each outgoing message to identify the logical tenant/customer/client that message belongs to, e.g. withMessageGroupId("tenant-123") on SendMessageRequest
  3. No queue creation flag or opt-in is needed: fairness is applied automatically to all standard-queue messages that carry a MessageGroupId, with no consumer code changes and no added API latency or throughput limitation
  4. Understand the mechanism: SQS monitors each tenant's in-flight (received-but-not-yet-deleted) message count, and when one tenant has a disproportionately large in-flight count (a 'noisy neighbor'), SQS prioritizes returning messages from other, quieter tenants to keep their dwell time low
  5. Monitor the effect using the fair-queues-specific CloudWatch metrics (e.g. ApproximateNumberOfMessagesVisibleInQuietGroups) alongside the standard ApproximateNumberOfMessagesVisible metric to see backlog isolation between noisy and quiet tenants
  6. Adopt fair queues when the queue is genuinely multi-tenant, high-throughput, and dwell time is a meaningful part of your application's quality of service — at low throughput a single tenant's burst rarely creates a cross-tenant backlog worth mitigating

Known gotchas

Related routes

Fan out SNS messages to multiple SQS queues with subscription filter policies
aws-sns · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans