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

---
title: Day 20/30 AWS System Design Patterns | daily.dev
description: A system design scenario explores a real-time customer support chat feature built with AWS AppSync Events and Lambda. In load testing with 5,000 concurrent...
canonical: https://daily.dev/posts/day-20-30-aws-system-design-patterns-s6enax5zx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Day 20/30 AWS System Design Patterns | daily.dev
og:description: A system design scenario explores a real-time customer support chat feature built with AWS AppSync Events and Lambda. In load testing with 5,000 concurrent...
og:url: https://daily.dev/posts/day-20-30-aws-system-design-patterns-s6enax5zx
og:image: https://api.daily.dev/og/posts/s6EnaX5Zx.png
og:image:alt: Day 20/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 20/30 AWS System Design Patterns

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

## Summary

A system design scenario explores a real-time customer support chat feature built with AWS AppSync Events and Lambda. In load testing with 5,000 concurrent sessions, publish latency is under 80ms but ~3% of customers never receive their first update despite agents confirming successful publishes. Four possible root causes are presented and analyzed: invalid channel naming, late client connections (no message persistence), Lambda rate limiting, and URL encoding issues. The correct answer is B — AppSync Events has no message store, so customers who connect after the agent publishes simply miss the update.

## Content

A team builds a customer-facing chat feature using AppSync Events _(HTTP pub/sub API — real-time message delivery to connected subscribers, no message persistence)_. The feature allows support agents to publish status updates to customers waiting in a queue. Each customer connects to a named channel scoped to their session. Agents publish to that channel when the queue position changes or when an agent is assigned.

The architecture: customers connect to AppSync Events channels. Agents invoke a Lambda function _(serverless compute)_ that calls the AppSync Events HTTP API to publish updates. The channel namespace is `/support/queue/{session_id}`.

In load testing with 5,000 concurrent customer sessions, publish latency from Lambda to AppSync Events is under 80 ms. But roughly 3% of customers report never receiving their first update. Agents confirm the updates were published — CloudWatch _(AWS monitoring service)_ shows successful AppSync Events API responses. The missing customers are spread randomly across sessions, not clustered by region or time.

What is the most likely cause?

A) The AppSync Events channel namespace pattern `/support/queue/{session_id}` is invalid — dynamic segments in channel names require a different format; but a naming issue would cause all customers to miss updates, not a random 3%

B) The 3% of customers connected after the agent published the update — AppSync Events _(HTTP pub/sub, no persistence — messages exist only at the moment of publish)_ has no message store; clients not connected at publish time do not receive the message

C) Lambda _(serverless compute)_ is hitting the AppSync Events API rate limit — throttled publish calls return 200 OK but are silently dropped; but rate limit responses return 429, not 200 OK, and the 3% miss rate is not correlated with publish frequency

D) The session_id values for the affected customers contain special characters that are URL-encoding incorrectly in the channel path; but URL encoding issues would cause consistent failures for all sessions with those characters, not a random 3% spread

Answer in the comments.

#AWS #SystemDesign #RealTimeUpdates #WebSockets #Serverless

## Community discussion

Top comments from developers on daily.dev.

**@joudawad** · 6 upvotes

> The answer is B.
>
> AppSync Events *(HTTP pub/sub, no message persistence)* is a real-time pub/sub system. When a message is published to a channel, it is delivered to all clients currently connected at the moment of publish. There is no message queue, no persistence layer, and no replay capability. If a client is not connected when the message is published — even by a few hundred milliseconds — it misses the message entirely.
>
> The 3% miss rate is a connection timing issue. These customers opened the chat interface, their client initiated the AppSync Events WebSocket connection, but the...

**@fahimahammed** · 3 upvotes

> the ans is b

**@joudawad** · 3 upvotes

> Also, it would mean a lot to me if you could support my content and stay in touch 🙏
>
> - YouTube: [https://www.youtube.com/@system-design-lab](https://www.youtube.com/@system-design-lab)
> - LinkedIn: [https://www.linkedin.com/in/joud-awad/](https://www.linkedin.com/in/joud-awad/)
> - Medium Blog: [https://joudwawad.medium.com/](https://joudwawad.medium.com/)
> - Substack: [https://joudawad.substack.com/](https://joudawad.substack.com/)

**@epicuser** · 2 upvotes

> B make sense to me in here!

**@agustinbarrientos** · 2 upvotes

> Would you gate the first agent update on an explicit ready acknowledgement from the client?

## Similar posts on daily.dev

- [5 Backend System Design Patterns Every Engineer Should Actually Understand](https://daily.dev/posts/5-backend-system-design-patterns-every-engineer-should-actually-understand-nzc6ercbu) · Medium · 5 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#career](https://daily.dev/tags/career), [#aws-lambda](https://daily.dev/tags/aws-lambda), [#real-time-systems](https://daily.dev/tags/real-time-systems)

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

```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-20-30-aws-system-design-patterns-s6enax5zx","headline":"Day 20/30 AWS System Design Patterns","text":"A system design scenario explores a real-time customer support chat feature built with AWS AppSync Events and Lambda. In load testing with 5,000 concurrent sessions, publish latency is under 80ms but ~3% of customers never receive their first update despite agents confirming successful publishes. Four possible root causes are presented and analyzed: invalid channel naming, late client connections (no message persistence), Lambda rate limiting, and URL encoding issues. The correct answer is B — AppSync Events has no message store, so customers who connect after the agent publishes simply miss the update.","url":"https://daily.dev/posts/day-20-30-aws-system-design-patterns-s6enax5zx","datePublished":"2026-08-09T16:45:34.870Z","dateModified":"2026-09-13T21:25:18.025Z","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":84960}},"image":"https://media.daily.dev/image/upload/s--if7xK6V9--/f_auto/v1786293936/posts/s6EnaX5Zx?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":99},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":21}],"comment":[{"@type":"Comment","text":"The answer is B.\nAppSync Events (HTTP pub/sub, no message persistence) is a real-time pub/sub system. When a message is published to a channel, it is delivered to all clients currently connected at the moment of publish. There is no message queue, no persistence layer, and no replay capability. If a client is not connected when the message is published — even by a few hundred milliseconds — it misses the message entirely.\nThe 3% miss rate is a connection timing issue. These customers opened the chat interface, their client initiated the AppSync Events WebSocket connection, but the connection handshake had not fully completed by the time the agent published the first update. The publish succeeded — AppSync accepted it and returned 200 OK — but there were no connected subscribers for that channel at that instant.\nThis is a fundamental characteristic of pub/sub systems without persistence. Two correct fixes:\nOption 1 — After the client connects, immediately fetch the current queue state via a REST or GraphQL query as an initialization step. The client has the latest state regardless of when it connected relative to the last publish.\nOption 2 — On connect, fetch a state snapshot; use the AppSync Events channel only for deltas after the snapshot. If full persistence is required, SQS (message queue, retains until consumed) or DynamoDB (managed NoSQL database, queryable at any time) for the initial state, with AppSync Events for real-time updates after connection.","datePublished":"2026-08-09T16:45:48.232Z","url":"https://daily.dev/posts/s6EnaX5Zx#c-BIRCIAxqj","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":6}},{"@type":"Comment","text":"the ans is b","datePublished":"2026-08-09T17:46:04.442Z","url":"https://daily.dev/posts/s6EnaX5Zx#c-47uzQnoyD","author":{"@type":"Person","name":"Fahim Ahammed Firoz","url":"https://daily.dev/fahimahammed","image":"https://lh3.googleusercontent.com/a/ACg8ocLPDnjeV4QsaVwi1lXMBgMAKbog9I4fgMTTJnHRKE-Uc1NmSJY0=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Also, it would mean a lot to me if you could support my content and stay in touch 🙏\n\nYouTube: https://www.youtube.com/@system-design-lab\nLinkedIn: https://www.linkedin.com/in/joud-awad/\nMedium Blog: https://joudwawad.medium.com/\nSubstack: https://joudawad.substack.com/","datePublished":"2026-08-09T16:46:18.157Z","url":"https://daily.dev/posts/s6EnaX5Zx#c-hevvvWShc","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":3}},{"@type":"Comment","text":"B make sense to me in here!","datePublished":"2026-08-09T17:47:31.206Z","url":"https://daily.dev/posts/s6EnaX5Zx#c-W9VbcCbAl","author":{"@type":"Person","name":"EpicUser","url":"https://daily.dev/epicuser","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Would you gate the first agent update on an explicit ready acknowledgement from the client?","datePublished":"2026-08-10T01:51:02.999Z","url":"https://daily.dev/posts/s6EnaX5Zx#c-ZZs2ObGIf","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}],"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 20/30 AWS System Design Patterns"}]}
```

