Integration and Messaging Flashcards
What are the 2 patterns of application communication?
- Synchronous (app to app)
- Asynchronous (app to queue to app)
What is the default retention period for SQS messages?
4 days, maximum 14 days
What size are SQS messages?
256KB
What is a Delay Queue?
A queue that allows you to delay messages becoming available for consumers
How long can you delay a message in the delay queue?
Up to 15 minutes
What is the default time for delay queues?
0 seconds (immediately available)
What parameter do you use to override the default delay for the delay queue?
DelaySeconds parameter
What data type is a message body?
String
What other options can be sent with a message body?
- Message attributes (metadata)
- Delay Delivery setting
How many messages can a consumer receive at one time?
10
What is visibility timeout?
The amount of time a message is invisible to other consumers after being picked up.
What is the maximum visibility timeout?
12 hours
What is the default visibility timeout?
30 seconds
How do you change the visibility timeout?
Use the ChangeMessageVisibility setting in the API
What is a Dead Letter Queue?
A queue that holds messages that have exceeded the redrive policy.
What is a redrive policy?
The threshold of how many times a message can go back into the queue.
What is Long Polling?
It allows a consumer to wait for a specified time for messages to become available.
What is the wait time limit for Long Polling?
1 to 20 seconds
What are the advantages of Long Polling?
- Decreases number of API calls
- Increases efficiency and latency of the application
How do you set the Long Poll time via API?
Use the WaitTimeSeconds parameter
What are the 3 default message attributes you can send with the body?
- Name
- Type
- Value
How many messages per second can a FIFO queue handle?
300
How do you send SQS messages larger than 256KB?
Use the SQS Extended Client
How does the Extended CLient work?
It sends a small message to SQS and a large message to S3. The consumer then gets the large file from S3
How do you publish SNS messages for mobile apps?
Use Direct Publish
What are the 3 steps to use Direct Publish?
- Create a Platform Application
- Create a Platform Endpoint
- Publish to the Platform Endpoint
What is the Fan-Out pattern?
It is when we use SNS and SQS together to prevent any data loss by pushing once in SNS and receiving in many SNS queues.
What is AWS Kinesis?
It is the AWS alternative to Apache Kafka, which streams real-time big data such as logs, clickstreams, IoT etc.
Is Kinesis Data automatically replicated?
Yes, into 3 Availability Zones
How long can data be in a shard in Kinesis?
Up to 7 days, default is 1 day
How many shards can a stream have?
Multiple
How many messages can a shard write per second?
1000 messages p/s or 1MB/s
How many messages can a shard read per second?
2MB/s
What is resharding?
When we add shards to the stream
What is shard merging?
When we subtract shards from the stream
How do you put data into Kinesis via API?
Use PutRecord with a PartitionKey.
What is the PartitionKey?
Identifies the partition/shard the data will be sent to.
How do you prevent overloading specific shards?
Choose a partition key that is highly distributed, such as user_id
What would you use to load data into Redshift, S3, ElasticSearch or Splunk?
Kinesis Firehose