
AWS Solutions Architect Question of the Day | Question 28 of 65
? One Event, Multiple Consumers? Use Fan-Out! ? #shorts
The Scenario: One order is placed, but four systems (Shipping, Inventory, Analytics, Email) must be notified immediately.
The Challenge: 1. Loose Coupling: Systems must not block each other. 2. Independent Scaling: Each system processes at different speeds. 3. Resiliency: One system's failure shouldn't stop the others.
The Solution: SNS + SQS Fan-Out Pattern ?
- SNS Topic: Acts as the broadcaster. The order service sends one message, and SNS pushes it to all subscribers.
- SQS Queues: Each downstream system has its own dedicated queue. This buffers messages so a slow system doesn't lag the entire process.
- Fault Tolerance: If the Email service goes down, messages stay safe in its SQS queue while Shipping and Inventory continue normally.
Why not a single SQS queue? Because SQS messages are deleted after one consumer pulls them; you need SNS to "clone" the message for everyone.
Exam Tip: See "One-to-Many" or "Multiple independent consumers"? The answer is SNS + SQS. ?
#AWS #SNS #SQS #SolutionsArchitect #SAAC03 #CloudArchitecture #Microservices #EventDriven #Serverless #SystemDesign #DevOps #TechTips #KodeKloud
The Scenario: One order is placed, but four systems (Shipping, Inventory, Analytics, Email) must be notified immediately.
The Challenge: 1. Loose Coupling: Systems must not block each other. 2. Independent Scaling: Each system processes at different speeds. 3. Resiliency: One system's failure shouldn't stop the others.
The Solution: SNS + SQS Fan-Out Pattern ?
- SNS Topic: Acts as the broadcaster. The order service sends one message, and SNS pushes it to all subscribers.
- SQS Queues: Each downstream system has its own dedicated queue. This buffers messages so a slow system doesn't lag the entire process.
- Fault Tolerance: If the Email service goes down, messages stay safe in its SQS queue while Shipping and Inventory continue normally.
Why not a single SQS queue? Because SQS messages are deleted after one consumer pulls them; you need SNS to "clone" the message for everyone.
Exam Tip: See "One-to-Many" or "Multiple independent consumers"? The answer is SNS + SQS. ?
#AWS #SNS #SQS #SolutionsArchitect #SAAC03 #CloudArchitecture #Microservices #EventDriven #Serverless #SystemDesign #DevOps #TechTips #KodeKloud
KodeKloud
...