Data Streaming Failure Management via Replica Rewind
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Data streaming systems often face challenges in ensuring that each record is processed exactly once, particularly under overload conditions or unexpected failures, leading to potential overcounting or loss of records, which is critical for applications requiring accurate real-time analysis.
Innovation Solution
The implementation of a method that detects replica failures in data streaming processing systems, notifies operators, performs a rewind procedure to identify processed records, and resumes processing from a secondary replica without reprocessing already accounted records, ensuring each record is accounted for exactly once using replication and distributed message queues.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data streaming systems use best-effort processing, then system simplicity and speed are improved, but record accuracy and reliability deteriorate
Solution Approach 1:
The system performs preliminary actions by maintaining replication of data records before processing, so that when a failure occurs, the alternative replica is already prepared and can immediately take over without data loss or duplication. This preliminary replication setup enables exact-once processing guarantees while maintaining high processing speed.
2Reliability
If data streaming systems implement failure recovery mechanisms, then reliability is improved, but system complexity increases
Solution Approach 1:
The system uses copying by maintaining duplicate replicas of data records. When a failure is detected, the system simply switches to the alternative replica copy, which already contains the same data. This copying approach provides reliable failure recovery without complex recovery procedures, as the alternative replica is already prepared with identical data.
Solution Approach 2:
The system segments the data processing into independent replicable units. Each data source is replicated across multiple independent copies, and the failure recovery process is segmented into simple switch-over operations. This segmentation enables reliable failure recovery while keeping individual component complexity low.
3Device complexity
If systems process records without replication, then device complexity is reduced, but data integrity under failure conditions deteriorates
Solution Approach 1:
The system implements copying by maintaining multiple replicas of each data record. This copying ensures that if one replica fails, the data integrity is preserved through the alternative replica. The copying mechanism provides data integrity with minimal additional complexity, as replicas are simple duplicates that can be switched between on demand.
4Reliability
If systems use ACID transactions to ensure exact-once processing, then record accuracy is improved, but processing overhead increases
Solution Approach 1:
The system uses copying through replica maintenance instead of ACID transactions. By having pre-replicated data available, the system achieves exact-once processing guarantees without the heavy overhead of transaction logging, locking, and commit protocols. The copying approach provides the same reliability with significantly reduced processing overhead.
Data Source
AI summary
A device, method and computer-readable medium for providing failure management of a data streaming processing system are disclosed. A method may detect a first replica of a shard has failed during processing of the stream of data records between a first operator and a second operator, notify the first operator and the second operator that the first replica of the shard has failed, perform a rewind procedure to identify data records that have been processed in the first replica and resume processing of the stream of data records between the first operator and the second operator via a second replica of the shard without processing the data records that have already been processed from the first replica.


