ExitAmazon Kinesis Data Streams: the sharded stream model1 / 9
Explanation

Many producers, one sharded stream

How a sharded, retained stream combines producer records for independent consumers using shared or enhanced fan-out and replayable read positions. · associate

Amazon Kinesis Data Streams accepts records from many producers into a retained stream. This is fan-in: producers contribute records to the same stream rather than sending a separate copy directly to every consumer.

A stream contains shards. Each record carries data and a partition key, whose hash determines its shard. Records with the same partition key route to the same shard while the shard layout is unchanged. Distributing keys helps spread traffic; one very busy key can concentrate traffic on one shard.

Each shard holds an ordered sequence of records identified by sequence numbers. There is no single ordering across all shards. The diagram shows record movement, not the API requests used to retrieve records.

Producer recordsProducer recordsPolled recordsPushed records
Amazon EC2Producer A
Amazon Elastic Container Service (Amazon ECS)Producer B
Amazon Kinesis Data StreamsRetained stream with shards
Amazon EC2Consumer A: shared throughput
Amazon EC2Consumer B: enhanced fan-out

1 / 5 Producer A runs on Amazon EC2, and Producer B runs on Amazon ECS. Each application creates records with partition keys.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.