DAS-C01 · Question #81
A banking company wants to collect large volumes of transactional data using Amazon Kinesis Data Streams for real-time analytics. The company uses PutRecord to send data to Amazon Kinesis, and has…
The correct answer is A. Design the application so it can remove duplicates during processing be embedding a unique ID. To achieve exactly-once semantics in a streaming pipeline using Amazon Kinesis Data Streams despite potential network outages, the application must be designed to remove duplicates during processing by embedding a unique ID in each record.
Question
A banking company wants to collect large volumes of transactional data using Amazon Kinesis Data Streams for real-time analytics. The company uses PutRecord to send data to Amazon Kinesis, and has observed network outages during certain times of the day. The company wants to obtain exactly once semantics for the entire processing pipeline. What should the company do to obtain these characteristics?
Options
- ADesign the application so it can remove duplicates during processing be embedding a unique ID
- BRely on the processing semantics of Amazon Kinesis Data Analytics to avoid duplicate
- CDesign the data producer so events are not ingested into Kinesis Data Streams multiple times.
- DRely on the exactly one processing semantics of Apache Flink and Apache Spark Streaming
How the community answered
(41 responses)- A83% (34)
- B10% (4)
- C2% (1)
- D5% (2)
Why each option
To achieve exactly-once semantics in a streaming pipeline using Amazon Kinesis Data Streams despite potential network outages, the application must be designed to remove duplicates during processing by embedding a unique ID in each record.
Kinesis Data Streams provides at-least-once delivery, meaning records might be delivered multiple times due to producer retries during network outages. To achieve exactly-once semantics for the entire pipeline, the consumer application must be idempotent and perform de-duplication, typically by using a unique identifier embedded in each data record to filter out duplicates.
Amazon Kinesis Data Analytics, like most streaming processors, typically provides at-least-once processing by default and relies on application-level de-duplication for exactly-once semantics, rather than inherently guaranteeing it for the entire pipeline.
While designing producers to minimize duplicates is good practice, network outages and retries can still lead to duplicate ingestion into Kinesis Data Streams; it is extremely difficult to guarantee no duplicates solely at the producer level.
Although Apache Flink and Apache Spark Streaming can offer exactly-once processing within their frameworks, they still consume from Kinesis Data Streams, which provides at-least-once delivery, meaning an overall pipeline still requires de-duplication mechanisms if the source introduces duplicates.
Concept tested: Achieving exactly-once semantics in streaming data pipelines
Source: https://docs.aws.amazon.com/kinesis/latest/dev/concepts-retries.html
Topics
Community Discussion
No community discussion yet for this question.