# Pricing for Yandex Data Streams

At the Preview stage, Yandex Data Streams can be used free of charge.

When the service becomes publicly available on **September 24, 2021**, you'll be charged for using it.

## What goes into the cost of using Data Streams

While using Data Streams, the number of units of written data and resources allocated for streaming data are billed.

Pricing for allocated resources is based on the limit of the shard throughput and data retention period.

### Example of cost calculation

A single-shard stream receives two 50 KB messages per second. The message retention period is 12 hours.

Calculation of the monthly cost of processing data (provided that there are 31 days in the month):

⌈ 50 / 40 ⌉ = 2

Where:

- 50 is the size of one message in KB.
- 40 is the size of units of written data in KB.
- 2 is the number of data units written per message.

While calculating the cost, the number of units of written data is rounded up to an integer. In this example, the number is rounded to 2.

2 × 2 = 4

Where:

- 2 is the number of messages per second.
- 2 is the number of data units written per message.
- 4 is the number of data units written per second.

4 × 60 × 60 × 24 × 31 = 10 713 600

Where:

- 4 is the number of data units written per second.
- 60 × 60 × 24 × 31 is the number of seconds in the month.
- 10 713 600 is the number of data units written per month.

10 713 600 / 1 000 000 × 0.015128 + 1.230769 =

Where:

- 10 713 600 is the number of data units written per month.
- 0.015128 is the cost of 1 million units of written data, $, without VAT.
- 1.230769 is the cost of allocated resources with a maximum data write speed per shard of 128 KB/s and a retention period of 12 hours, $, per month, without VAT.

Total: $1.392847, without VAT.

## Pricing

### Cost of a unit of written data

Unit size | Cost per million units, without VAT |
---|---|

40 KB | $0.015128 |

### Cost of allocated resources

Cost of using allocated resources per month:

Data retention period |
Cost of storing data with a throughput limit per shard of 128 KB/s, without VAT |
Cost of storing data with a throughput limit per shard of 512 KB/s, without VAT |
Cost of storing data with a throughput limit per shard of 1 MB/s, without VAT |
---|---|---|---|

1 hour | $0.923077 | — | — |

4 hours | $1.076923 | $2.461538 | $4.000000 |

12 hours | $1.230769 | $3.692308 | $5.846154 |

24 hours | $1.846154 | $5.538462 | $8.615385 |