Why Should I Use Amazon Kinesis And Not Sns-Sqs?

Scotty Moe

Updated on:

This article aims to compare the functionalities and advantages of Amazon Kinesis and SNS-SQS, two services utilized for managing data streams.

While both services have their merits, there are distinct advantages to using Amazon Kinesis over SNS-SQS.

Amazon Kinesis is particularly recommended for specific use cases that necessitate the routing, ordering, and concurrent consumption of data records.

It offers the ability to route data records to different shards, ensuring the preservation of record order and enabling multiple applications to simultaneously consume data.

Furthermore, Kinesis allows for processing data in the same order, even after a few hours, which is advantageous in situations where the processing of one item is inseparable from another.

Additionally, Kinesis is optimized for high throughput and low latency requirements, making it well-suited for real-time data processing and analysis.

It is crucial to mention that while SNS-SQS is generally preferred for most use cases, Kinesis provides simpler and more cost-effective alternatives if it aligns with the requirements.

Comparison of Functionality

The comparison of the functionality between Amazon Kinesis and SNS-SQS reveals that:

  • Kinesis provides advantages such as the ability to read the same message from multiple applications, re-reading messages, and retaining data for up to 7 days. This makes it suitable for scenarios requiring routing, ordering, and concurrent consumption of related records.

  • On the other hand, SNS-SQS is preferred for most use cases unless message order is important. SNS can be used as fan-out to SQS, providing similar advantages as Kinesis. Adding extra SQS subscribed to SNS can also provide a longer message retention period.

  • SNS-SQS offers ease of use and provides most capabilities compared to Kinesis.

  • Additionally, SQS FIFO supports time-ordering of messages, making it suitable for scenarios with messaging semantics and visibility timeout requirements.

Advantages of SNS-SQS

Advantages of SNS-SQS include:

  • Simplicity and cost-effectiveness of SQS
  • Ability to send the same message to multiple SQSs
  • Option to use SQS for worker queues

SQS provides a straightforward and affordable solution that meets the requirements of many use cases. It offers seamless scalability, allowing it to handle occasional load spikes or business growth without any issues.

Additionally, SNS can be used to send the same message to multiple SQSs, enabling fan-out functionality. SQS is also suitable for worker queues, where messages can be acknowledged or deleted once they are processed.

Moreover, as of June 2018, SQS can directly trigger a Lambda function, providing more flexibility in integrating with other AWS services.

The pricing of SQS is based on the number of requests and the message size, making it a cost-effective choice for smaller message sizes and lower data volumes.

Advantages of Kinesis

Kinesis offers several advantages that make it a recommended choice for various scenarios:

  • Kinesis provides a routing capability that allows data records to be efficiently routed to different shards. This enables the processing and analysis of data in a more organized and streamlined manner.

  • One of the key advantages of Kinesis is its ability to maintain the order of records. Even if records are produced at different times, Kinesis ensures that they are consumed in the same order, making it suitable for real-time data processing and analysis.

  • Kinesis allows for the retention of data for up to 7 days. This extended retention period ensures that the data is available for analysis and processing over a longer duration.

  • Kinesis is designed to handle high throughput and low latency requirements. This makes it an ideal choice for use cases that demand fast and efficient data processing.

  • In terms of pricing, Kinesis offers a model that charges based on the number of shards and data put in. This pricing structure can be more cost-effective for scenarios involving larger message sizes and higher data volumes compared to Simple Queue Service (SQS).

Leave a Comment