
Answer-first summary for fast verification
Answer: Store data in a key-value store and use batch processing to manage upserts efficiently.
Option B provides an efficient solution for handling upserts in a stream processing solution. A key-value store offers fast and scalable storage, which is essential for managing high volumes of upserts. Using batch processing helps in reducing the overhead associated with individual upsert operations, ensuring that the system can handle the workload efficiently while maintaining data consistency and integrity.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are designing a stream processing solution that must upsert stream data into a database efficiently. Describe how you would configure the system to handle these upserts, including the data storage solution you would use and the mechanisms you would put in place to ensure data consistency and integrity.
A
Use a relational database and rely on database transactions to ensure data consistency during upserts.
B
Store data in a key-value store and use batch processing to manage upserts efficiently.
C
Archive data in a NoSQL database and use snapshotting to ensure consistency during upserts.
D
Use a message broker for data storage and rely on its built-in upsert functionality to handle data integrity.
No comments yet.