Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Data Streams
    • Overview
    • Terms and definitions
    • Partitions and partition keys
    • Quotas and limits
    • Comparison with Yandex Message Queue
    • Transactions involving data streams and YDB tables
  • Access management
  • Pricing policy
  • FAQ

In this article:

  • Data stream
  • Shard
  • Shard key
  • Shard throughput
  • Message
  • Message body
  • Message sequence number
  • Message retention period
  • Consumers
  • Consumer groups
  1. Concepts
  2. Terms and definitions

Terms and definitions in Data Streams

Written by
Yandex Cloud
Updated at November 26, 2024
  • Data stream
  • Shard
    • Shard key
    • Shard throughput
  • Message
    • Message body
    • Message sequence number
    • Message retention period
  • Consumers
  • Consumer groups

Data streamData stream

A data stream is a named set of messages. Messages in Data Streams are written and read via streams. Data streams are created based on Yandex Managed Service for YDB and are stored in databases.

ShardShard

To enable horizontal scaling, a stream is divided into shards which are units of concurrency. Each shard has a limited throughput.

Note

As for now, you can only reduce the number of shards in a stream by deleting and recreating a stream with a smaller number of shards.

You can configure a data stream to increase the number of shards as the write speed into the stream increases. For more information, see autopartitioning in the YDB documentation.

Shard keyShard key

A shard key is specified for each message while writing it to a stream. Using the key hash, the message is mapped to a certain shard inside the stream.

Warning

When updating the number of stream shards, their distribution across the key hash space changes, too. Messages that were written before the number of shards was updated remain in the same shards and the same sequence. New messages are distributed over a new number of shards.

Shard throughputShard throughput

Each shard has a limited user-defined throughput. The maximum data write speed per shard is 1 MB/sec and the maximum data read speed is 2 MB/sec.

MessageMessage

A message is the minimum atomic unit of user information.

It consists of a body and additional system properties.

Message bodyMessage body

The body of a message is a set of bytes. Data Streams does not interpret the message body in any way.

Message sequence numberMessage sequence number

When writing data to a stream, each message is assigned a sequence number. Message sequence numbers are unique within a single shard and increase sequentially.

Message retention periodMessage retention period

The message retention period is set for each stream. After it expires, messages are automatically deleted.

ConsumersConsumers

Consumers are applications that get data from Data Streams and process it. All consumers share the total quota for data reads.

Consumer groupsConsumer groups

In some cases, the common quota model for all consumers is too restrictive, so each consumer gets a guaranteed read speed. Consumers with a guaranteed read speed are called consumer groups.

Was the article helpful?

Previous
Overview
Next
Partitions and partition keys
© 2025 Direct Cursus Technology L.L.C.