<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv" -->

---
title: Day 22/30 AWS System Design Patterns | daily.dev
description: A scenario-based system design puzzle walks through a multi-tenant SaaS platform whose shared SQS Standard queue gets monopolized by one tenant's...
canonical: https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Day 22/30 AWS System Design Patterns | daily.dev
og:description: A scenario-based system design puzzle walks through a multi-tenant SaaS platform whose shared SQS Standard queue gets monopolized by one tenant's...
og:url: https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv
og:image: https://api.daily.dev/og/posts/2YuqGxiYV.png
og:image:alt: Day 22/30 AWS System Design Patterns
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Day 22/30 AWS System Design Patterns

**[Joud Awad](https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh)** · [@joudawad](https://daily.dev/joudawad) · 2 min read · 59 upvotes · 14 comments

## Summary

A scenario-based system design puzzle walks through a multi-tenant SaaS platform whose shared SQS Standard queue gets monopolized by one tenant's 50,000-message bulk export, starving other tenants and breaching SLAs. Four proposed fixes are evaluated: splitting queues per tenant (doesn't scale to 200+ tenants), switching to SQS FIFO with per-tenant MessageGroupId (doesn't fix fairness since ordering isn't fairness), scaling consumer count (doesn't help when one tenant dominates message volume), and enabling SQS Fair Queues with MessageGroupId set to tenant_id, which throttles noisy tenants in real time without per-tenant queue provisioning.

## Content

A B2B SaaS platform processes background jobs — report generation, data exports, invoice creation — through a single SQS Standard queue _(message queue, all messages compete equally for consumer capacity)_. There are 40 tenants sharing the queue. Each message carries a `tenant_id` field. Ten worker processes consume from the queue at a combined throughput of 800 messages per minute.

For most tenants, jobs complete within 2–3 minutes of submission. The architecture has been stable for two years.

Last Tuesday, Tenant `enterprise-07` ran their quarterly data export: 50,000 messages submitted over 20 minutes. The other 39 tenants submitted a combined 3,100 messages in that same window.

For the duration of the export, every other tenant's jobs waited 18–25 minutes. Three tenants with 5-minute SLAs breached. Two of them escalated to your account manager.

Your team proposes splitting into two queues: one dedicated to `enterprise-07`, one for everyone else. It would work. But you have 40 tenants today and a sales pipeline with 200 more.

What is the correct fix?

A) Split into two queues now and build a queue-per-tenant provisioning system for future growth — works at 40 tenants, becomes 240 queues, 240 consumer pools, and a provisioning system you now own at 240

B) Switch to SQS FIFO _(First-In-First-Out queue, enforces ordering within MessageGroups — does not implement fairness across groups)_ with one MessageGroupId per tenant — `enterprise-07`'s messages still dominate because they are the majority of messages in the queue

C) Enable SQS Fair Queues _(Standard queue feature — tracks in-flight count per MessageGroupId, deprioritizes noisy groups in real time)_ on the existing Standard queue and set `MessageGroupId` to `tenant_id` on every message

D) Scale consumers from 10 to 50 workers — `enterprise-07` still accounts for 94% of messages; 94% of 50 new workers spend their time on one tenant; small tenant wait times drop marginally but the SLA breach continues

Answer in the comments.

#AWS #SystemDesign #DistributedSystems #SoftwareArchitecture #MultiTenancy

## Community discussion

Top comments from developers on daily.dev.

**@joudawad** · 9 upvotes

> The answer is C.
>
> AWS launched SQS Fair Queues _(Standard queue feature — tracks in-flight count per MessageGroupId, deprioritizes noisy groups in real time)_ in July 2025. It runs on Standard queues — not FIFO — and solves the noisy neighbor problem at the queue layer without restructuring your architecture.
>
> When you enable Fair Queues and set `MessageGroupId` on messages, SQS _(message queue)_ tracks in-flight message counts per group in real time. When one group's count grows disproportionately — `enterprise-07` sending faster than consumers can process — SQS identifies it as a noisy...

**@joudawad** · 2 upvotes

> A — Queue-per-tenant works at 40 tenants. At 240 it becomes an operational problem: 240 queues, 240 consumer pools, 240 alarm configurations, and a provisioning system you now own and maintain. You've moved the problem from SQS into your own infrastructure.

**@trevorsuna** · 1 upvotes

> C is the scalable fix here. Using tenant_id as MessageGroupId gives SQS the signal it needs to reduce noisy-neighbor impact without multiplying queues and worker pools. I’d still alert on per-tenant age-of-oldest-message so fairness problems stay visible.

**@joudawad** · 1 upvotes

> B — SQS FIFO _(First-In-First-Out queue, enforces ordering within groups)_ with one MessageGroupId per tenant enforces ordering within each group and prevents parallel processing of the same tenant's messages. It does not implement fairness across groups. `enterprise-07`'s messages still dominate consumer capacity because they are the majority of messages in the queue. FIFO throughput defaults to 300 API calls per second per action — 3,000 messages/second with batching — and high-throughput mode raises that ceiling dramatically; but no throughput mode adds fairness across groups, which is the...

**@mdshafinahmed** · 1 upvotes

> Go ahead brother.

---

Tags: [#aws](https://daily.dev/tags/aws), [#career](https://daily.dev/tags/career), [#architecture](https://daily.dev/tags/architecture), [#multi-tenancy](https://daily.dev/tags/multi-tenancy)

[View this post on daily.dev](https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv","headline":"Day 22/30 AWS System Design Patterns","text":"A scenario-based system design puzzle walks through a multi-tenant SaaS platform whose shared SQS Standard queue gets monopolized by one tenant's 50,000-message bulk export, starving other tenants and breaching SLAs. Four proposed fixes are evaluated: splitting queues per tenant (doesn't scale to 200+ tenants), switching to SQS FIFO with per-tenant MessageGroupId (doesn't fix fairness since ordering isn't fairness), scaling consumer count (doesn't help when one tenant dominates message volume), and enabling SQS Fair Queues with MessageGroupId set to tenant_id, which throttles noisy tenants in real time without per-tenant queue provisioning.","url":"https://daily.dev/posts/day-22-30-aws-system-design-patterns-2yuqgxiyv","datePublished":"2026-08-13T10:03:29.833Z","dateModified":"2026-09-13T20:49:10.028Z","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0","description":"Principal Solution Architecture ","worksFor":{"@type":"Organization","name":"Metalab","logo":"https://www.google.com/s2/favicons?domain=metalab.com&sz=128"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":86100}},"image":"https://media.daily.dev/image/upload/s--ot71Stmn--/f_auto/v1786615416/posts/2YuqGxiYV?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":59},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":14}],"comment":[{"@type":"Comment","text":"The answer is C.\nAWS launched SQS Fair Queues (Standard queue feature — tracks in-flight count per MessageGroupId, deprioritizes noisy groups in real time) in July 2025. It runs on Standard queues — not FIFO — and solves the noisy neighbor problem at the queue layer without restructuring your architecture.\nWhen you enable Fair Queues and set MessageGroupId on messages, SQS (message queue) tracks in-flight message counts per group in real time. When one group’s count grows disproportionately — enterprise-07 sending faster than consumers can process — SQS identifies it as a noisy neighbor and deprioritizes its messages, actively pulling from the other groups instead. The moment enterprise-07’s in-flight count dominates, SQS starts favoring the 39 other tenants until their backlogs drain. No code changes in consumers. No new infrastructure.","datePublished":"2026-08-13T10:03:53.389Z","url":"https://daily.dev/posts/2YuqGxiYV#c-DSrn1KQgj","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9}},{"@type":"Comment","text":"A — Queue-per-tenant works at 40 tenants. At 240 it becomes an operational problem: 240 queues, 240 consumer pools, 240 alarm configurations, and a provisioning system you now own and maintain. You’ve moved the problem from SQS into your own infrastructure.","datePublished":"2026-08-13T10:04:00.025Z","url":"https://daily.dev/posts/2YuqGxiYV#c-O0xLY4jDY","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"C is the scalable fix here. Using tenant_id as MessageGroupId gives SQS the signal it needs to reduce noisy-neighbor impact without multiplying queues and worker pools. I’d still alert on per-tenant age-of-oldest-message so fairness problems stay visible.","datePublished":"2026-08-14T06:25:35.619Z","url":"https://daily.dev/posts/2YuqGxiYV#c-ni3OYqMRk","author":{"@type":"Person","name":"Trevor Suna","url":"https://daily.dev/trevorsuna","image":"https://media.daily.dev/image/upload/s--dZ7gXxpp--/f_auto/v1784081551/avatars/avatar_EMoP47rpuw8DNjhp6R1b6?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"B — SQS FIFO (First-In-First-Out queue, enforces ordering within groups) with one MessageGroupId per tenant enforces ordering within each group and prevents parallel processing of the same tenant’s messages. It does not implement fairness across groups. enterprise-07’s messages still dominate consumer capacity because they are the majority of messages in the queue. FIFO throughput defaults to 300 API calls per second per action — 3,000 messages/second with batching — and high-throughput mode raises that ceiling dramatically; but no throughput mode adds fairness across groups, which is the actual requirement.","datePublished":"2026-08-13T10:04:06.919Z","url":"https://daily.dev/posts/2YuqGxiYV#c-JuQBTIfGN","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Go ahead brother.","datePublished":"2026-08-15T02:23:07.632Z","url":"https://daily.dev/posts/2YuqGxiYV#c-fl5ciWD5T","author":{"@type":"Person","name":"Md. Shafin Ahmed","url":"https://daily.dev/mdshafinahmed","image":"https://media.daily.dev/image/upload/s---a0uwu1i--/f_auto/v1783046504/avatars/avatar_u8iR8DacSYjsphyDqQTQ9?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh","name":"Joud Awad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Joud Awad","item":"https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh"},{"@type":"ListItem","position":3,"name":"Day 22/30 AWS System Design Patterns"}]}
```

