Amazon Kinesis and Guaranteed Order

Amazon claims Kinesis in-line product guarantees order bookings.

It provides the ordering of records, as well as the ability to read and / or play records in the same order (...)

Kinesis consists of Streams, which in themselves consist of one or more fragments. Records are stored in these fragments. We can write consumer applications that connect to Shard and read / replay records in the order in which they were saved.

But can Kinesis guarantee that because of the box, when ordering Stream itself, without causing the order logic to consumers? How can a consumer read records from several fragments of the same stream, making sure that the records are read in the same order in which they were added to the stream?

+4
source share
1 answer

It seems impossible to achieve this. The order is guaranteed at the level of fragments, but not throughout the stream.

https://brandur.org/kinesis-order

So, back to our original question: how can we guarantee that all records are consumed in the same order in which they are made? The answer is that we cannot, but that we must not allow this unhappy reality bothers us too much. Once weve scaled our stream to a few shards, there is no mechanism that we can use to ensure that records are consumed in order throughout the stream; in only one shard.

+1
source

Source: https://habr.com/ru/post/1653120/


All Articles