[{"data":1,"prerenderedAt":428},["ShallowReactive",2],{"practiceExams":3,"studies":184,"free-lesson-\u002Fcourses\u002Faws-certified-solutions-architect-professional\u002Flessons\u002Fwebsockets-connection-aware-real-time-delivery-sap-c03":185},[4,22,36,48,60,72,84,97,109,120,130,141,154,163,175],{"id":5,"slug":6,"description":7,"questionCount":8,"isActive":9,"datePublicModified":10,"difficulty":11,"examVersion":18},22,"aws-certified-solutions-architect-professional-sap-c03","Prepare for the AWS Certified Solutions Architect - Professional (SAP-C03) exam with realistic practice questions on architecture, security, cost, resilience and automation, with detailed explanations.",767,true,"2026-11-15T00:00:00.000Z",{"providerId":12,"title":13,"subtitle":14,"slug":15,"coverImageUrl":16,"level":17},1,"AWS Certified Solutions Architect - Professional","SAP-C02","aws-certified-solutions-architect-professional","\u002Fimages\u002Fdifficulties\u002Faws-certified-solutions-architect-professionalsap-c02\u002Fcovers\u002Faws-SAP-C02.png","advanced",{"slug":6,"code":19,"dateBetaStart":20,"dateReleased":21,"pageSlug":15},"SAP-C03",null,"2026-11-17",{"id":23,"slug":24,"description":25,"questionCount":26,"isActive":9,"datePublicModified":27,"difficulty":28,"examVersion":34},5,"aws-certified-cloud-practitioner-clf-c02","Master your AWS Certified Cloud Practitioner exam with our Practice Exam Simulator. Prepare effectively and assess your readiness with realistic practice exams designed to mirror the most popular official AWS exam.",937,"2026-10-30T00:00:00.000Z",{"providerId":12,"title":29,"subtitle":30,"slug":31,"coverImageUrl":32,"level":33},"AWS Certified Cloud Practitioner","CLF-C02","aws-certified-cloud-practitioner","\u002Fimages\u002Fdifficulties\u002Faws-certified-cloud-practitionerclf-c02\u002Fcovers\u002Faws-CLF-C02.png","foundational",{"slug":24,"code":30,"dateBetaStart":20,"dateReleased":35,"pageSlug":31},"2023-09-19",{"id":37,"slug":38,"description":39,"questionCount":40,"isActive":9,"datePublicModified":27,"difficulty":41,"examVersion":46},8,"aws-certified-devops-engineer-professional-dop-c02","Boost your readiness for the AWS Certified DevOps Engineer - Professional (DOP-C02) exam with our practice exam simulator. Featuring realistic questions and detailed explanations, it helps you identify knowledge gaps and improve your skills.",1040,{"providerId":12,"title":42,"subtitle":43,"slug":44,"coverImageUrl":45,"level":17},"AWS Certified DevOps Engineer - Professional","DOP-C02","aws-certified-devops-engineer-professional","",{"slug":38,"code":43,"dateBetaStart":20,"dateReleased":47,"pageSlug":44},"2023-03-07",{"id":49,"slug":50,"description":51,"questionCount":52,"isActive":9,"datePublicModified":27,"difficulty":53,"examVersion":57},11,"aws-certified-ai-practitioner-aif-c01","Prepare for the AWS Certified AI Practitioner exam with our practice exam simulator. Realistic questions on AI, machine learning and generative AI fundamentals, with detailed explanations, help you find your knowledge gaps and assess your readiness.",928,{"providerId":12,"title":54,"subtitle":55,"slug":56,"coverImageUrl":45,"level":33},"AWS Certified AI Practitioner","AIF-C01","aws-certified-ai-practitioner",{"slug":50,"code":55,"dateBetaStart":58,"dateReleased":59,"pageSlug":56},"2024-08-13","2024-10-22",{"id":12,"slug":61,"description":62,"questionCount":63,"isActive":9,"datePublicModified":27,"difficulty":64,"examVersion":70},"aws-certified-solutions-architect-associate-saa-c03","Unlock your potential with the AWS Certified Solutions Architect - Associate Practice Exam Simulator. This comprehensive tool is designed to prepare you thoroughly and assess your readiness for the most sought-after AWS associate certification.",1203,{"providerId":12,"title":65,"subtitle":66,"slug":67,"coverImageUrl":68,"level":69},"AWS Certified Solutions Architect - Associate","SAA-C03","aws-certified-solutions-architect-associate","\u002Fimages\u002Fdifficulties\u002Faws-certified-solutions-architect-associatesaa-c03\u002Fcovers\u002Faws-SAA-C03.png","associate",{"slug":61,"code":66,"dateBetaStart":20,"dateReleased":71,"pageSlug":67},"2022-08-30",{"id":73,"slug":74,"description":75,"questionCount":76,"isActive":9,"datePublicModified":27,"difficulty":77,"examVersion":81},9,"aws-certified-data-engineer-associate-dea-c01","Prepare for your AWS Certified Data Engineer - Associate exam with our practice exam simulator. Featuring real exam scenarios, detailed explanations, and instant feedback to boost your confidence and success rate.",891,{"providerId":12,"title":78,"subtitle":79,"slug":80,"coverImageUrl":45,"level":69},"AWS Certified Data Engineer - Associate","DEA-C01","aws-certified-data-engineer-associate",{"slug":74,"code":79,"dateBetaStart":82,"dateReleased":83,"pageSlug":80},"2023-11-27","2024-03-12",{"id":85,"slug":86,"description":87,"questionCount":88,"isActive":9,"datePublicModified":89,"difficulty":90,"examVersion":94},17,"aws-certified-generative-ai-developer-professional-aip-c01","Get ready for the AWS Certified Generative AI Developer - Professional exam with our practice exam simulator. Realistic scenario-based questions with detailed explanations help you assess your readiness to build generative AI solutions on AWS.",982,"2026-10-29T00:00:00.000Z",{"providerId":12,"title":91,"subtitle":92,"slug":93,"coverImageUrl":45,"level":17},"AWS Certified Generative AI Developer - Professional","AIP-C01","aws-certified-generative-ai-developer-professional",{"slug":86,"code":92,"dateBetaStart":95,"dateReleased":96,"pageSlug":93},"2025-11-28","2026-03-17",{"id":98,"slug":99,"description":100,"questionCount":101,"isActive":9,"datePublicModified":89,"difficulty":102,"examVersion":107},13,"aws-certified-security-specialty-scs-c03","Advance your career in cloud security with the AWS Certified Security - Specialty (SCS-C03) Exam Simulator. Realistic, scenario-based practice exams mirror the official exam, with detailed explanations to close your knowledge gaps.",864,{"providerId":12,"title":103,"subtitle":104,"slug":105,"coverImageUrl":106,"level":17},"AWS Certified Security - Specialty","SCS-C03","aws-certified-security-specialty","\u002Fimages\u002Fdifficulties\u002Faws-certified-security-specialtyscs-c02\u002Fcovers\u002Faws_SCS_c02.png",{"slug":99,"code":104,"dateBetaStart":20,"dateReleased":108,"pageSlug":105},"2025-12-01",{"id":110,"slug":111,"description":112,"questionCount":113,"isActive":9,"datePublicModified":89,"difficulty":114,"examVersion":118},19,"aws-certified-machine-learning-engineer-associate-mla-c02","Prepare for the AWS Certified Machine Learning Engineer - Associate exam with our practice exam simulator. Realistic questions with detailed explanations help you find your knowledge gaps and assess your readiness to build and run ML workloads on AWS.",861,{"providerId":12,"title":115,"subtitle":116,"slug":117,"coverImageUrl":45,"level":69},"AWS Certified Machine Learning Engineer - Associate","MLA-C02","aws-certified-machine-learning-engineer-associate",{"slug":111,"code":116,"dateBetaStart":119,"dateReleased":20,"pageSlug":117},"2026-09-29",{"id":121,"slug":122,"description":123,"questionCount":124,"isActive":9,"datePublicModified":89,"difficulty":125,"examVersion":129},15,"aws-certified-ai-business-strategist-aib-c01","Prepare for the AWS Certified AI Business Strategist exam with our practice exam simulator. Realistic, scenario-based questions with detailed explanations help you assess your readiness to lead AI adoption on AWS and close your knowledge gaps.",848,{"providerId":12,"title":126,"subtitle":127,"slug":128,"coverImageUrl":45,"level":33},"AWS Certified AI Business Strategist","AIB-C01","aws-certified-ai-business-strategist",{"slug":122,"code":127,"dateBetaStart":119,"dateReleased":20,"pageSlug":128},{"id":131,"slug":132,"description":133,"questionCount":134,"isActive":9,"datePublicModified":89,"difficulty":135,"examVersion":139},21,"aws-certified-cloudops-engineer-associate-soa-c03","Prepare for the AWS Certified CloudOps Engineer - Associate exam with our practice exam simulator. Realistic questions with detailed explanations help you assess your readiness to deploy, operate and troubleshoot workloads on AWS.",862,{"providerId":12,"title":136,"subtitle":137,"slug":138,"coverImageUrl":45,"level":69},"AWS Certified CloudOps Engineer - Associate","SOA-C03","aws-certified-cloudops-engineer-associate",{"slug":132,"code":137,"dateBetaStart":20,"dateReleased":140,"pageSlug":138},"2025-09-30",{"id":142,"slug":143,"description":144,"questionCount":145,"isActive":9,"datePublicModified":146,"difficulty":147,"examVersion":151},10,"aws-certified-advanced-networking-specialty-ans-c01","The AWS Certified Advanced Networking - Specialty practice exam simulates the real test, offering scenario-based questions that assess your ability to design, implement, and troubleshoot complex AWS networking solutions. ",681,"2024-11-13T00:00:00.000Z",{"providerId":12,"title":148,"subtitle":149,"slug":150,"coverImageUrl":45,"level":17},"AWS Certified Advanced Networking - Specialty","ANS-C01","aws-certified-advanced-networking-specialty",{"slug":143,"code":149,"dateBetaStart":152,"dateReleased":153,"pageSlug":150},"2022-01-01","2022-07-12",{"id":155,"slug":156,"description":157,"questionCount":158,"isActive":9,"datePublicModified":159,"difficulty":160,"examVersion":161},6,"aws-certified-solutions-architect-professional-sap-c02","Elevate your career with the AWS Certified Solutions Architect - Professional Exam Simulator. Get ready to ace the most popular Professional AWS exam with our realistic practice exams. Assess your readiness, boost your confidence, and ensure your success.",789,"2024-06-06T00:00:00.000Z",{"providerId":12,"title":13,"subtitle":14,"slug":15,"coverImageUrl":16,"level":17},{"slug":156,"code":14,"dateBetaStart":20,"dateReleased":162,"pageSlug":20},"2022-11-15",{"id":164,"slug":165,"description":166,"questionCount":167,"isActive":9,"datePublicModified":159,"difficulty":168,"examVersion":173},4,"aws-certified-developer-associate-dva-c02","Unlock your potential as a software developer with the AWS Certified Developer - Associate Exam Simulator! Prepare thoroughly with realistic practice exams designed to mirror the official exam.",399,{"providerId":12,"title":169,"subtitle":170,"slug":171,"coverImageUrl":172,"level":69},"AWS Certified Developer - Associate","DVA-C02","aws-certified-developer-associate","\u002Fimages\u002Fdifficulties\u002Faws-certified-developer-associatedva-c02\u002Fcovers\u002Faws-DVA-C02.png",{"slug":165,"code":170,"dateBetaStart":20,"dateReleased":174,"pageSlug":171},"2023-02-28",{"id":176,"slug":177,"description":178,"questionCount":179,"isActive":9,"datePublicModified":159,"difficulty":180,"examVersion":181},7,"aws-certified-security-specialty-scs-c02","Advance your career in cloud cybersecurity with the AWS Certified Security - Specialty Exam Simulator! Tailored for professionals, this tool offers realistic practice exams to mirror the official exam.",5431,{"providerId":12,"title":103,"subtitle":104,"slug":105,"coverImageUrl":106,"level":17},{"slug":177,"code":182,"dateBetaStart":20,"dateReleased":183,"pageSlug":20},"SCS-C02","2023-07-11",[],{"slug":186,"title":187,"focus":188,"level":17,"components":189,"diagrams":236,"steps":278,"dateModified":423,"course":424,"nextLesson":425},"websockets-connection-aware-real-time-delivery-sap-c03","WebSockets: connection-aware real-time delivery","How connection registries and subscription mappings route published events to WebSocket clients while handling disconnects, reconnects, and slow consumers.",[190,196,200,204,208,212,216,220,224,228,232],{"key":191,"kind":192,"name":193,"icon":194,"provider":195},"amazon-api-gateway","service","Amazon API Gateway","\u002Fimages\u002Fprovider-services\u002Famazon-api-gateway\u002Fcovers\u002FArch_Amazon-API-Gateway_64.png","AWS",{"key":197,"kind":192,"name":198,"icon":199,"provider":195},"amazon-dynamodb","Amazon DynamoDB","\u002Fimages\u002Fprovider-services\u002Famazon-dynamodb\u002Fcovers\u002FArch_Amazon-DynamoDB_64.png",{"key":201,"kind":192,"name":202,"icon":203,"provider":195},"amazon-eventbridge","Amazon EventBridge","\u002Fimages\u002Fprovider-services\u002Famazon-eventbridge\u002Fcovers\u002FArch_Amazon-EventBridge_64.png",{"key":205,"kind":192,"name":206,"icon":207,"provider":195},"amazon-kinesis-data-firehose","Amazon Data Firehose","\u002Fimages\u002Fprovider-services\u002Famazon-kinesis-data-firehose\u002Fcovers\u002FArch_Amazon-Kinesis-Data-Firehose_64.png",{"key":209,"kind":192,"name":210,"icon":211,"provider":195},"amazon-kinesis-data-streams","Amazon Kinesis Data Streams","\u002Fimages\u002Fprovider-services\u002Famazon-kinesis-data-streams\u002Fcovers\u002FArch_Amazon-Kinesis-Data-Streams_64.png",{"key":213,"kind":192,"name":214,"icon":215,"provider":195},"amazon-simple-notification-service-(amazon-sns)","Amazon Simple Notification Service (Amazon SNS)","\u002Fimages\u002Fprovider-services\u002Famazon-simple-notification-service-(amazon-sns)\u002Fcovers\u002FArch_Amazon-Simple-Notification-Service_64.png",{"key":217,"kind":192,"name":218,"icon":219,"provider":195},"amazon-simple-queue-service-(amazon-sqs)","Amazon Simple Queue Service (Amazon SQS)","\u002Fimages\u002Fprovider-services\u002Famazon-simple-queue-service-(amazon-sqs)\u002Fcovers\u002FArch_Amazon-Simple-Queue-Service_64.png",{"key":221,"kind":192,"name":222,"icon":223,"provider":195},"aws-appsync","AWS AppSync","\u002Fimages\u002Fprovider-services\u002Faws-appsync\u002Fcovers\u002FArch_AWS-AppSync_64.png",{"key":225,"kind":192,"name":226,"icon":227,"provider":195},"aws-lambda","AWS Lambda","\u002Fimages\u002Fprovider-services\u002Faws-lambda\u002Fcovers\u002FArch_AWS-Lambda_64.png",{"key":229,"kind":192,"name":230,"icon":231,"provider":195},"elastic-load-balancing-(elb)","Elastic Load Balancing (ELB)","\u002Fimages\u002Fprovider-services\u002Felastic-load-balancing-(elb)\u002Fcovers\u002FArch_Elastic-Load-Balancing_64.png",{"key":233,"kind":234,"name":235,"icon":20,"provider":20},"users","generic","Users",[237],{"key":238,"cards":239,"groups":258,"lines":259},"connection-routing",[240,243,246,249,252,255],{"key":241,"component":233,"label":242},"clients","WebSocket clients",{"key":244,"component":191,"label":245},"gateway","WebSocket API",{"key":247,"component":225,"label":248},"routes","Connection and message routes",{"key":250,"component":197,"label":251},"registry","Connections and subscriptions",{"key":253,"component":217,"label":254},"queue","Published-event backlog",{"key":256,"component":225,"label":257},"delivery","Fan-out worker",[],[260,262,264,266,268,270,272,274,276],{"from":241,"to":244,"label":261},"Client commands",{"from":244,"to":247,"label":263},"Route invocations",{"from":247,"to":250,"label":265},"Membership updates",{"from":247,"to":253,"label":267},"Published events",{"from":253,"to":256,"label":269},"Event batches",{"from":256,"to":250,"label":271},"Query or cleanup",{"from":250,"to":256,"label":273},"Recipient records",{"from":256,"to":244,"label":275},"PostToConnection",{"from":244,"to":241,"label":277},"Event frames",[279,338,361,364,374,377,395,398,410],{"kind":280,"title":281,"body":282,"diagram":238,"walkthrough":283,"table":316},"explanation","Separate the socket from the routing state","\u003Cp>A persistent \u003Cstrong>WebSocket connection\u003C\u002Fstrong> is a delivery address, not a subscription. API Gateway holds the socket; short-lived handlers maintain application state. A \u003Cstrong>connection registry\u003C\u002Fstrong> associates a connection ID with its principal, tenant, endpoint, and lifetime. A \u003Cstrong>subscription mapping\u003C\u002Fstrong> associates an authorized topic with connection IDs.\u003C\u002Fp>\u003Cp>This design accepts subscribe and publish commands through the socket. Route handlers update membership or enqueue an authorized publication. A separate worker resolves its recipients and calls \u003Ccode>PostToConnection\u003C\u002Fcode> for each one. API Gateway does not automatically turn application topics into WebSocket broadcasts. The diagram shows application interactions; routine service acknowledgments are omitted.\u003C\u002Fp>\u003Cp>The selected interfaces matter: the gateway must expose API Gateway routes and its connection-management API, the registry must support keyed membership queries and conditional updates, and the backlog must support SQS visibility and deletion semantics. Similar-looking messaging services are not interchangeable implementations of these contracts.\u003C\u002Fp>",[284,289,295,300,308,313],{"text":285,"cards":286,"lines":287},"Clients send subscription and publication commands over their established API Gateway WebSocket connections.",[241,244],[288],{"from":241,"to":244},{"text":290,"cards":291,"lines":292},"API Gateway invokes the connection and message route handlers. These handlers authorize membership changes and write connection and subscription records to DynamoDB.",[247,250],[293,294],{"from":244,"to":247},{"from":247,"to":250},{"text":296,"cards":297,"lines":298},"For an authorized publish command, the route handler writes an event containing its tenant, topic, and event identifier to the SQS backlog.",[253],[299],{"from":247,"to":253},{"text":301,"cards":302,"lines":303},"SQS supplies event batches to the fan-out worker. The worker queries DynamoDB for recipient records, can clean up stale entries there, and submits connection-addressed messages to API Gateway using PostToConnection.",[256],[304,305,306,307],{"from":253,"to":256},{"from":256,"to":250},{"from":250,"to":256},{"from":256,"to":244},{"text":309,"cards":310,"lines":311},"API Gateway sends the submitted event frames over the addressed client connections.",[],[312],{"from":244,"to":241},{"text":314,"cards":315},"Membership state selects the recipients, the backlog decouples publication from fan-out, and the gateway owns the live sockets.",[],{"columns":317,"rows":322},[318,319,320,321],"Role","Selected component","Nearby alternatives","Contract they lack",[323,328,333],[324,325,326,327],"Socket gateway","API Gateway","ELB; AppSync","API Gateway routes and PostToConnection",[329,330,331,332],"Queryable membership","DynamoDB","EventBridge; SNS","Keyed registry queries and conditional updates",[334,335,336,337],"Work backlog","SQS","Kinesis Data Streams; Data Firehose","SQS visibility and per-message deletion",{"kind":339,"title":340,"exercise":341},"exercise","Restore the three interface contracts",{"type":342,"diagram":238,"question":343,"hidden":344,"tray":345},"palette","Fill the three slots using the gateway, membership-store, and work-backlog contracts just described.",[244,250,253],[346,347,348,349,351,353,355,357,359],{"component":191},{"component":197},{"component":217},{"component":229,"reason":350},"ELB can carry WebSocket traffic but does not expose API Gateway route integrations or PostToConnection.",{"component":221,"reason":352},"AppSync has its own real-time interfaces, not this API Gateway route and connection-management contract.",{"component":201,"reason":354},"EventBridge routes events; it does not provide keyed connection-registry queries and conditional membership updates.",{"component":213,"reason":356},"SNS distributes publications; it does not provide the queryable connection and subscription records required here.",{"component":209,"reason":358},"Kinesis Data Streams uses shard positions and consumer checkpoints, not SQS visibility and per-message deletion.",{"component":205,"reason":360},"Data Firehose buffers delivery to destinations rather than exposing the required SQS work-consumption contract.",{"kind":280,"title":362,"body":363},"Make membership connection-scoped and race-safe","\u003Cp>Use a \u003Cstrong>connection-scoped record\u003C\u002Fstrong> for each socket and topic membership records keyed by tenant and topic, with the connection ID identifying each member. Keep a reverse lookup by connection so disconnect cleanup can find its memberships without scanning every topic. Query every result page during fan-out; for hot topics, explicit membership shards spread reads but require querying all shards. An eventually consistent index can temporarily miss a new subscription, so its subscribe acknowledgment alone is not a gap-free delivery boundary.\u003C\u002Fp>\u003Cp>Authenticate establishment and authorize each subscribe or publish action against the current tenant and permissions. Treat \u003Cstrong>$disconnect\u003C\u002Fstrong> as best-effort cleanup, not proof that all dead sockets are removed. Expiry timestamps bound validity, but DynamoDB TTL deletion is asynchronous: workers must reject logically expired records. A \u003Cstrong>GoneException\u003C\u002Fstrong> identifies an unavailable connection; remove only that connection's state, using conditions where records could have been replaced.\u003C\u002Fp>\u003Cp>A \u003Cstrong>reconnect\u003C\u002Fstrong> creates a new connection ID; it does not restore memberships or replay messages. In this lesson's protocol, the client waits for connection establishment, sends a subscribe command, and waits for a subscribed acknowledgment sent only after authorization and membership commit. Use the server-provided connection ID, not an address supplied by the client. Late cleanup for the old ID must never delete the new membership. Durable replay or snapshot recovery needs a separate application protocol.\u003C\u002Fp>",{"kind":339,"title":365,"exercise":366},"Re-establish one subscription",{"type":367,"question":368,"steps":369},"process","Order the reconnect protocol through its subscription acknowledgment.",[370,371,372,373],"Complete establishment of a new WebSocket connection.","Send the subscribe command over that connection.","Authorize the command and commit membership under its server-provided connection ID.","Send the subscribed acknowledgment after the commit succeeds.",{"kind":280,"title":375,"body":376},"Bound fan-out instead of amplifying slow consumers","\u003Cp>The shared \u003Cstrong>SQS backlog\u003C\u002Fstrong> absorbs bursts of publications; it is not an independent mailbox for every connection. In this design, recipient membership is resolved when the worker processes the event, not when it was published. A publication-time audience requires a stored recipient snapshot or membership-version policy. Paginate recipient queries and bound fan-out concurrency so one large topic cannot create unlimited simultaneous sends.\u003C\u002Fp>\u003Cp>Apply a \u003Cstrong>per-connection budget\u003C\u002Fstrong> as well: cap outstanding bytes or unacknowledged events and their age, using shared state when workers run concurrently. Coalesce replaceable state updates; for nonreplaceable events, use durable replay or disconnect a lagging client and require resynchronization. A successful \u003Ccode>PostToConnection\u003C\u002Fcode> is not proof that the application processed the message. Application acknowledgments and sequence numbers are needed to measure consumption progress.\u003C\u002Fp>\u003Cp>Handle delivery results independently: clean up a gone connection, retry transient failures with bounded backoff and jitter, and do not let one stalled recipient block healthy ones. Retrying a whole event can resend it to recipients that already succeeded. Use \u003Cstrong>event IDs\u003C\u002Fstrong> for deduplication and sequence numbers for gap detection; concurrent workers and retries do not establish application ordering merely because each live socket preserves frame order.\u003C\u002Fp>",{"kind":339,"title":378,"exercise":379},"Follow one bounded delivery",{"type":380,"diagram":238,"scenario":381,"path":382},"trace","Trace one queued event to an authorized, unexpired subscriber whose outstanding-message budget allows another send.",[383,385,387,389,391,393],{"card":253,"note":384},"The publication waits independently of the publishing route invocation.",{"card":256,"note":386},"A worker receives the event and begins bounded fan-out.",{"card":250,"note":388},"The worker queries the event's tenant-and-topic membership.",{"card":256,"note":390},"Recipient records return; the worker checks expiry and admits this recipient within its outstanding-message budget.",{"card":244,"note":392},"PostToConnection addresses this connection ID; acceptance is not an application-processing acknowledgment.",{"card":241,"note":394},"The client receives the event frame and can acknowledge processing using the application protocol.",{"kind":280,"title":396,"body":397},"Assemble the delivery contract","\u003Cp>Keep \u003Cstrong>control traffic\u003C\u002Fstrong> and \u003Cstrong>delivery work\u003C\u002Fstrong> distinct. Client commands enter the gateway and invoke route handlers. Those handlers change membership or enqueue publications; they do not hold sockets open while fan-out runs. Workers consume queued events, query membership, and send to the gateway's connection-management interface rather than directly to browsers.\u003C\u002Fp>\u003Cp>The same worker-to-registry interaction supports \u003Cstrong>stale-state cleanup\u003C\u002Fstrong> after a gone response. Route-driven cleanup and worker-driven cleanup must be idempotent and connection-scoped. Reconnect restoration, subscription visibility, and permission changes determine which records are eligible; bounded concurrency and per-connection budgets determine which eligible sends can proceed now.\u003C\u002Fp>\u003Cp>The diagram's return arrow from the registry explicitly carries \u003Cstrong>recipient records\u003C\u002Fstrong>. Its other arrows show commands, invocations, work, or event frames—not every network response. Rebuild these application interactions while keeping the limits clear: this shared backlog provides neither per-client replay nor exactly-once processing.\u003C\u002Fp>",{"kind":339,"title":399,"exercise":400},"Rebuild connection-aware delivery",{"type":401,"diagram":238,"question":402,"decoys":403},"build","Place the components, draw the taught application interactions, and label them to reconstruct authorized publication, connection-scoped membership maintenance, and bounded fan-out to live sockets.",[404,406,408],{"component":229,"reason":405},"ELB carries WebSocket traffic but cannot supply the gateway's API Gateway route and PostToConnection interfaces.",{"component":213,"reason":407},"SNS cannot replace the membership store's keyed recipient queries and conditional connection-scoped cleanup.",{"component":209,"reason":409},"Kinesis Data Streams cannot supply the backlog's SQS visibility and per-message deletion contract.",{"kind":280,"title":411,"body":412,"takeaways":413},"What to remember","\u003Cp>\u003Cstrong>Connection-aware delivery\u003C\u002Fstrong> combines explicit recipient mappings, race-safe connection lifecycle handling, and bounded fan-out rather than treating an open socket as a durable subscription.\u003C\u002Fp>",[414,417,420],{"title":415,"text":416},"Resolve explicit recipients","The gateway owns sockets; application state maps authorized tenant-and-topic subscriptions to connection IDs. A worker queries those mappings before connection-addressed sends.",{"title":418,"text":419},"Expect stale connections","Disconnect notifications and TTL deletion are not immediate guarantees. Use logical expiry, gone-response cleanup, and connection-scoped updates so old cleanup cannot remove a reconnected session.",{"title":421,"text":422},"Bound and verify delivery","A shared queue does not isolate every slow client or provide replay. Bound outstanding work, use application acknowledgments, and design deduplication and recovery explicitly.","2026-11-16T06:51:24.347Z",{"pageSlug":15,"code":19,"certification":13,"certificationSlug":15},{"slug":426,"title":427},"aws-appsync-managed-real-time-publish-subscribe-sap-c03","AWS AppSync: managed real-time publish–subscribe",1796130195818]