Decoupling apps, SQS, SNS, kinesis, Active MQ Flashcards

1
Q

What is Amazon SQS?

How is Amazon SQS defined in the context of AWS?

Explain the purpose and characteristics of Amazon SQS.

Summarize the significance of using Amazon SQS in AWS.

A

Answer: Amazon SQS, or Simple Queue Service, is a fully managed message queuing service provided by Amazon Web Services. It enables decoupling of the components of a cloud application by allowing them to communicate asynchronously.
SQS supports both standard queues for high-throughput, best-effort delivery, and FIFO (First-In-First-Out) queues for applications that require messages to be processed in a strict order.

Real world Use-Case: Consider a scenario where different components of a microservices-based application need to communicate without direct dependencies. Amazon SQS can be used to establish communication between these components, ensuring asynchronous and reliable message delivery.

Amazon SQS facilitates loose coupling between components in a distributed system by providing a reliable and scalable message queuing service. It enables components to communicate asynchronously, enhancing the overall flexibility and reliability of cloud applications.

Default retention of messages 4 days, max of 14 days
Msg size upto 256KB

The use of Amazon SQS is significant for designing scalable and decoupled architectures in AWS. By leveraging SQS, users can build resilient and loosely-coupled systems, improving the overall reliability and performance of cloud applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Message Visibility Timeout?

How is Message Visibility Timeout defined in the context of Amazon SQS?

Explain the purpose and characteristics of Message Visibility Timeout.

Summarize the significance of using Message Visibility Timeout in AWS SQS.

A

Answer: Message Visibility Timeout is a parameter in Amazon SQS that determines the amount of time a message remains invisible to consumers after being received from a queue. During this timeout period, the message is reserved and cannot be processed by other consumers. If the processing consumer doesn’t delete the message within the timeout, it becomes visible again for other consumers to process.

Real world Use-Case: Consider a scenario where a consumer retrieves a message from an SQS queue for processing. The Message Visibility Timeout ensures that the message is not immediately visible to other consumers, allowing the first consumer adequate time to process and delete the message.

Message Visibility Timeout is a crucial mechanism in SQS for managing the processing of messages by consumers. It prevents multiple consumers from processing the same message simultaneously, ensuring orderly and efficient message processing.

The use of Message Visibility Timeout is significant for maintaining message processing order and preventing message duplication in SQS. By configuring an appropriate timeout, users can control the visibility of messages and avoid concurrent processing conflicts in distributed systems on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Amazon SQS Long Polling?

How is Amazon SQS Long Polling defined in the context of AWS?

Explain the purpose and characteristics of Amazon SQS Long Polling.

Summarize the significance of using Amazon SQS Long Polling in AWS.

A

Answer: Amazon SQS Long Polling is a feature that allows consumers to retrieve messages from an SQS queue while minimizing the number of empty responses. Unlike traditional short polling, where consumers immediately receive responses (even if the queue is empty), long polling allows consumers to wait for a specified duration for new messages. This reduces the number of empty responses and minimizes unnecessary API requests.

Real world Use-Case: Consider a scenario where a consumer wants to efficiently retrieve messages from an SQS queue without frequent empty responses. Amazon SQS Long Polling can be utilized to wait for messages up to a specified timeout, reducing the need for constant polling.

When a consumer requests messaes from the queue, it can optionally “wait” for messages to arrive fi there are non in the queue.Long polling can be enabled at the API level using WaitTimeSeconds.

The use of Amazon SQS Long Polling is significant for applications that aim to minimize the number of empty responses during message retrieval. By leveraging long polling, users can enhance the efficiency of their SQS-based messaging systems and reduce unnecessary API requests on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Amazon SNS?

How is Amazon SNS defined in the context of AWS?

Explain the purpose and characteristics of Amazon SNS.

Summarize the significance of using Amazon SNS in AWS.

A

Answer: Amazon SNS, or Simple Notification Service, is a fully managed messaging service provided by Amazon Web Services. It enables the creation and publication of messages or notifications to distributed subscribers or endpoints. SNS supports various protocols, including HTTP, HTTPS, Email, SMS, and more, allowing developers to send messages to a variety of endpoints.

Real world Use-Case: Consider a scenario where an application needs to notify users about new updates or events. Amazon SNS can be used to send notifications to subscribers through various channels, such as email, SMS, or mobile push notifications.

Amazon SNS simplifies the process of sending messages or notifications to distributed subscribers. It provides a scalable and flexible messaging service with support for multiple protocols, making it suitable for a wide range of applications and use cases.

The use of Amazon SNS is significant for applications requiring real-time communication and notification capabilities. By leveraging SNS, developers can easily send messages to multiple subscribers through various channels, enhancing the overall responsiveness and user engagement of applications on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is SNS + SQS: Fan-out?

How is SNS + SQS: Fan-out defined in the context of AWS?

Explain the purpose and characteristics of SNS + SQS: Fan-out.

Summarize the significance of using SNS + SQS: Fan-out in AWS.

A

Answer: SNS + SQS: Fan-out is an architectural pattern in AWS where Amazon Simple Notification Service (SNS) is used in conjunction with Amazon Simple Queue Service (SQS) to enable a “fan-out” messaging model. In this pattern, SNS acts as a topic to which multiple SQS queues are subscribed. When a message is published to the SNS topic, it is delivered to all subscribed SQS queues simultaneously, allowing for parallel processing of the same message by multiple consumers.

Real world Use-Case: Consider a scenario where an application needs to process incoming events through multiple parallel workflows. SNS + SQS: Fan-out can be implemented to publish events to an SNS topic, and multiple SQS queues can subscribe to the topic, allowing different workflows to process the same event in parallel.

SNS + SQS: Fan-out is designed to facilitate parallel processing of messages by distributing them to multiple SQS queues subscribed to an SNS topic. It enhances scalability and flexibility in scenarios where the same message needs to be processed by multiple consumers concurrently.

The use of SNS + SQS: Fan-out is significant for applications requiring parallel and distributed processing of messages. By leveraging this architectural pattern, users can design systems that efficiently handle messages across multiple workflows, improving overall performance and scalability on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is SNS Message Filter?

How is SNS Message Filter defined in the context of AWS?

Explain the purpose and characteristics of SNS Message Filter.

Summarize the significance of using SNS Message Filter in AWS.

A

Answer: SNS Message Filter is a feature in Amazon Simple Notification Service (SNS) that allows subscribers to selectively receive only the messages that match predefined filter conditions. By applying filter policies during topic subscription, subscribers can specify the attributes and values a message must have to be delivered to their endpoint.

Real world Use-Case: Consider a scenario where an application has different types of subscribers interested in distinct subsets of messages. SNS Message Filter can be employed to enable subscribers to receive only the messages that match specific attributes, ensuring targeted message delivery.

SNS Message Filter provides a mechanism for subscribers to tailor their message preferences based on specific attributes. This enables a more targeted and efficient message delivery system, catering to the diverse needs of subscribers within an SNS topic.

The use of SNS Message Filter is significant for optimizing message delivery in scenarios where subscribers have varying interests. By allowing subscribers to filter messages based on attributes, SNS Message Filter enhances the flexibility and customization of message distribution within SNS on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Amazon Kinesis?

How is Amazon Kinesis defined in the context of AWS?

Explain the purpose and characteristics of Amazon Kinesis.

Summarize the significance of using Amazon Kinesis in AWS.

A

Answer: Amazon Kinesis is a set of services provided by Amazon Web Services for real-time processing of streaming data at scale.
It offers three main components:
- Kinesis Data Streams for ingesting and processing real-time data,
- Kinesis Data Firehose for loading data into data stores,
- Kinesis Data Analytics for real-time analytics on streaming data.
- Kinesis video streams: capture, process & store video streams.

Real world Use-Case: Consider a scenario where a company needs to process and analyze real-time data from various sources, such as social media or IoT devices. Amazon Kinesis can be employed to ingest, process, and analyze streaming data, enabling real-time insights and actions.

The use of Amazon Kinesis is significant for applications that require the processing of large volumes of streaming data. By leveraging Kinesis, users can build real-time analytics, monitoring, and other data-driven applications on the AWS cloud, enhancing their capabilities in handling dynamic and rapidly changing data streams.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Kinesis Data Streams?

How are Kinesis Data Streams defined in the context of AWS?

Explain the purpose and characteristics of Kinesis Data Streams.

Summarize the significance of using Kinesis Data Streams in AWS.

A

Answer: Kinesis Data Streams is a service within Amazon Kinesis that enables real-time processing of streaming data at scale. It allows users to ingest, process, and analyze large volumes of streaming data in real time. Kinesis Data Streams is based on the concept of shards, where each shard can ingest and process a specific amount of data, providing scalability and parallel processing.

Real world Use-Case: Consider a scenario where an e-commerce platform wants to analyze and respond to user behavior in real time. Kinesis Data Streams can be used to ingest and process clickstream data, enabling real-time analytics for personalized recommendations and targeted marketing.

By partitioning data into shards, it enables parallel processing and supports the development of real-time applications that require low-latency data processing.

The use of Kinesis Data Streams is significant for applications that demand real-time processing of large volumes of streaming data. With its scalable and distributed architecture, Kinesis Data Streams empowers developers to build responsive and data-driven applications on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Kinesis Data Firehose?

How is Kinesis Data Firehose defined in the context of AWS?

Explain the purpose and characteristics of Kinesis Data Firehose.

Summarize the significance of using Kinesis Data Firehose in AWS.

A

Answer: Kinesis Data Firehose is a service within Amazon Kinesis that simplifies the process of ingesting and loading streaming data into other AWS services or data stores. It allows users to capture, transform, and deliver data in real-time to destinations such as Amazon S3, Amazon Redshift, or Amazon Elasticsearch without the need for manual intervention.

Real world Use-Case: Consider a scenario where a company needs to store streaming data from IoT devices directly into Amazon S3 for long-term storage. Kinesis Data Firehose can be configured to automatically deliver the data to an S3 bucket in real-time.

Kinesis Data Firehose streamlines the data delivery process by automating the flow of streaming data to various AWS destinations. It eliminates the need for manual intervention and simplifies the management of real-time data ingestion and transformation.

The use of Kinesis Data Firehose is significant for applications that require seamless and automated delivery of streaming data to AWS services or data stores. By leveraging Kinesis Data Firehose, users can ensure the efficient and timely loading of streaming data into their preferred destinations on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SQS vs SNS vs Kinesis

What are the key differences between Amazon SQS, Amazon SNS, and Amazon Kinesis?

Highlight the unique characteristics and use cases of each service.

Summarize the significance of choosing between SQS, SNS, and Kinesis in AWS.

A

Amazon SQS (Simple Queue Service):
- Purpose: SQS is a fully managed message queuing service that enables the decoupling of components in a distributed system by allowing asynchronous communication.
Use Cases: Best suited for scenarios where components need to communicate asynchronously through message queues.
Key Feature: Supports both standard queues for high-throughput and FIFO queues for ordered message processing.

Amazon SNS (Simple Notification Service):
- Purpose: SNS is a fully managed messaging service that allows the creation and delivery of messages to distributed subscribers or endpoints.
Use Cases: Ideal for scenarios where notifications or messages need to be broadcast to multiple subscribers through various protocols.
Key Feature: Supports multiple protocols, including HTTP, HTTPS, Email, SMS, etc.

Amazon Kinesis:
- Purpose: Kinesis is a set of services designed for real-time processing of streaming data at scale.
Use Cases: Suited for applications requiring the ingestion, processing, and analysis of large volumes of real-time streaming data.
Key Feature: Comprises Kinesis Data Streams for data ingestion, Kinesis Data Firehose for data delivery to destinations, and Kinesis Data Analytics for real-time analytics.

Real world Use-Case: Consider a scenario where an e-commerce platform needs to process real-time clickstream data.
- SQS can be used to decouple components,
- SNS to notify subscribers about critical events,
- Kinesis to ingest and analyze the streaming data.

The choice between SQS, SNS, and Kinesis depends on the specific requirements of the application.
- SQS is for message queuing,
- SNS for notification broadcasting,
- Kinesis for real-time streaming data processing.

Understanding their characteristics is crucial for designing scalable and efficient systems on the AWS cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Kinesis vs SQS Ordering

How does message ordering differ between Amazon Kinesis and Amazon SQS?

Highlight the key aspects of message ordering in Kinesis and SQS.

Summarize the significance of understanding message ordering in both services.

A

Amazon Kinesis:
- Ordering: Kinesis Data Streams provides ordering at the shard level. Messages within a shard are processed in the order they are ingested into the stream.
Key Aspect: Ordering is guaranteed only within a shard, and if there are multiple shards, there is no global ordering across all shards.
Consideration: Developers need to design applications with the understanding that ordering is specific to the shard, and data may be processed out of order if multiple shards are used.

Amazon SQS (Simple Queue Service):
- Ordering: SQS offers ordering at both the message and group level. Messages within a standard SQS queue are processed in the order they are received. In FIFO queues, the order is maintained based on the order of message receipt and a message group ID.
Key Aspect: FIFO queues ensure strict ordering at the message level, making them suitable for scenarios requiring precise message sequencing.
Consideration: FIFO queues have higher throughput limitations compared to standard queues, and ordering comes with certain constraints.

Real world Use-Case: Consider a scenario where processing order is critical, such as in a financial system.
If strict message ordering is required, an Amazon SQS FIFO queue might be preferable.
If processing order within shards is acceptable, Amazon Kinesis could be a scalable choice.

Understanding the nuances of message ordering in Kinesis and SQS is crucial for designing systems that meet specific sequencing requirements.
While Kinesis provides ordering at the shard level, SQS offers more granular control with ordering at both the message and group levels. Choosing the appropriate service depends on the specific needs of the application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Amazon MQ?

How is Amazon MQ defined in the context of AWS?

Explain the purpose and characteristics of Amazon MQ.

Summarize the significance of using Amazon MQ in AWS.

A

Answer: Amazon MQ is a managed message broker service provided by Amazon Web Services. It supports popular messaging protocols such as MQTT, AMQP, and STOMP, making it compatible with a variety of applications. Amazon MQ simplifies the setup and maintenance of message-oriented middleware, allowing users to focus on building scalable and decoupled applications.

Real world Use-Case: Consider a scenario where an application requires reliable and scalable messaging between microservices. Amazon MQ can be used to establish a message broker that facilitates communication and ensures reliable message delivery.

Amazon MQ acts as a fully managed message broker, providing reliable and scalable messaging solutions. It supports industry-standard protocols, enabling seamless integration with diverse applications and systems.

When migrating to the cloud, instead of re-engineering the apps to use SQS and SNS, we can use Amazon MQ, that is a managed message broker service RabbitMQ and ActiveMQ. It has both queue feature (~SQS) & topic feature (~SNS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly