Decoupling Workflows Flashcards
(85 cards)
What is meant by tight coupling?
One application (or instance) talking directly to another application (or instance).
What is meant by loose coupling?
Not having one application (or instance) talk directly to another. Instead you want highly available, scalable, managed service in between resources (like ELB)
What is Simple Queue Service (SQS)?
SQS is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems and serverless applications
What is Simple Notification Service (SNS)?
SNS is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication
What is API Gateway?
API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor and secure APIs at any scale
Which is preferred: tight or loose coupling?
Loose coupling is ALWAYS preferred. Don’t select answers that include instance-to-instance communication.
Where is important for applications to be loosely coupled?
Every layer, both internal and external
What is poll-based messaging?
A producer of messages writes a message into a queue (SQS) and a consumer can retrieve the message whenever it is ready
What is Simple Queue Service (SQS)?
Simple Queue Service is a messaging queue that allows asynchronous processing of work. One resource will write a message to an SQS queue, and then another resource will retrieve that message from SQS.
What is the delivery delay in SQS?
The queue hides messages for this period of time before making them visible. Default is 0 and maximum is 15 minutes.
What is the message size in SQS?
Messages can be up to 256KB in any format
What encryption is provided by default in SQS?
Messages are encrypting in-transit by default, but you can add at-rest
What is message retention setting in SQS?
The length of time that a message can be kept in SQSl. Default is 4 days; can be set between 1 minute and 14 days.
What is the difference between long and short polling in SQS?
Short polling checks for messages and exits if none exists, which burns extra CPU cycles. Long polling isn’t the default in SQS, but it should be (setting the connection time window).
What is the queue depth in SQS?
This is a value, not a setting. This can be a trigger for autoscaling.
What is the visibility timeout in SQS?
A lock on a message (default 30 seconds) where no other consumer can receive the message while a consumer is processing it and reaches out to say it is done.
If the message is successfully processed within the visibility timeout, the message is deleted from the queue.
If you are asked a question about what to look for if you are burning too much CPU (cash) with an SQS queue, what setting would you recommend looking at?
The connection time window (set it for long polling)
What is a dead letter queue in SQS?
An SQS queue that you can temporarily sideline messages into when they can’t be processed successfully from the main queue.
What is the dead letter queue setting, maximum receives, used for?
The maximum number of times the message can be read before it gets sidelined to the dead letter queue
What is an important metric to monitor on a dead letter queue in SQS?
Queue depth
Can you use dead letter queues with SNS?
Yes, on SNS topics
What type of message ordering is guaranteed with Standard SQS queues?
Best effort ordering
Is there a guarantee around not receiving duplicate messages with Standard SQS queue?
No
What type of SQS queue guarantees messages are delivered in order?
FIFO queue (and also guarantees no duplicates)