Service Communication Flashcards
1
Q
Step Functions
A
- Represent flow as Json State Machine
- Max execution time of 1 year
- Human approval flows
- Add latency because of passing calls
- No integration with Mechanical Turk
2
Q
Step Functions
A
- Lambda Tasks
- Activity Tasks
- HTTP Activity worker, backed by EC2, Mobile Device, on-prem Data Center
- Poll Step Functions service , is there an activity for me to do?
- Service Task
- AWS Service integration
- Wait Task, for the duration or until timestamp
3
Q
Step Functions - User Case Triggers
A
- Rest Api call from API Gateway
- CW Events
- AWS SDK/CLI
4
Q
Simple Workflow Service (Legacy)
A
- Mechanical Turk integration
- Not serverless, EC2
- 1 year max runtime
- Activity, decision and human intervention steps
- Good for:
- External signals intervening in the workflow
- Child processes that return values to parent processes
5
Q
SQS
A
- Serverless, IAM integration
- Extreme scale, no provisioning required
- Max message size 256KB, use S3 pointer for larger
6
Q
SQS Use Cases
A
- Can be read from EC2, Lambda
- Can be used as write buffer for DDB (throttling)
7
Q
SQS FIFO
A
- Preserve sent order
- 300 messages/s without batching
- 3000 messages with batching
8
Q
Event Source Mapping SQS && SQS FIFO
A
- Long Poll SQS
- Specify Batch size
- Set queue visibility to be 6x that of lambda function
9
Q
Dynamo DB Idempotence
A
Insert NOT idempotent
Upsert IS idempotent
10
Q
SQS DLQ
A
- Setup from SQS directly
- DLQ for lambda is only for async invocations
- OR use a Lambda Destination to have DLQ from Lambda
11
Q
Amazon MQ vs SQS
A
- For traditional/open protocols
- AWS protocols for SQS/SNS are proprietary and will require application refactor, phased migration
- Doesn’t scale as much
- Runs on dedicated machine, can run in HA for failover
12
Q
SNS
A
- Pub/Sub, one SNS as many consumers as desired
- Can filter messages (new features)
- Up to 10,000,000 subscriptions per topic
- 100,000 topics limit
- Delivery retries for HTTP/HTTPS
13
Q
SNS - SQS Fanout
A
- Ensure delivery between SNS and SQS, no data loss
- Fully decoupled
- Can add consumers at any time (later)
- SQS allows for delayed processing, retries
- Processing can be at different speed
14
Q
Kinesis
A
Gives scale and also allows allows ordering by partition key