Pricing policy for Managed Service for YDB Serverless mode
To calculate the cost of using the service, use the calculator on the Yandex Cloud website or see the prices in this section.
When you use Managed Service for YDB in Serverless mode, you are billed for each request made to the database. Users don't have to indicate the resources they need: the database quickly adapts to changes in the user load. Apart from requests, the user pays for the data stored in Managed Service for YDB on an hourly basis. Other operations, such as restoring data from backups, are charged additionally.
What goes into the cost of using Managed Service for YDB Serverless mode
When using Managed Service for YDB in Serverless mode, you pay for the following:
- Data operations.
- The amount of stored data, including service data, such as indexes.
- Additional user operations, like restoring data from backups.
Other consumed resources to be additionally paid for:
- The space used in Yandex Object Storage to store on-demand backups.
- Egress traffic from Yandex Cloud.
In all calculations, 1 GB = 210 MB = 220 KB = 230 bytes.
Data operations and request units
The serverless mode of Managed Service for YDB supports multiple ways to work with data:
- YQL is an SQL-like language for accessing relational tables, supported by the SDK
, CLI , and management console in YDB. - Document API is the Amazon DynamoDB-compatible HTTP API. You can use this API to perform operations on document tables.
You can also query the database through the special APIs available as stand-alone features in the YDB SDK, CLI, or management console.
To calculate the cost of requests in YDB, we use so-called request units (RU). Each executed request, depending on its type, complexity, and data size, consumes a certain number of RU. The total cost of all executed requests to YDB is the sum of the RU costs for each request.
Rules for calculating the cost of requests to YDB in RU:
Pricing for Request Unit consumption
- Actual consumption (on-demand). The cost of using YDB for a certain period is the number of spent Request Units multiplied by the price per Request Unit minus the monthly free package. If there were no requests to the database or if the amount of RU spent in the current month is less than the free package, there is no charge for actual RU consumption.
- Provisioned capacity. If your load is predictable and has a fixed component, you can reduce the cost of using YDB by paying part (or all) of RU spent at an hourly rate. To do this, set a non-zero value of the database parameter "Provisioned capacity, RU/s". After that, you are charged according to a special pricing plan, the rate for which is set to RU/s × hour, with billing per second. The consumption of RU within the specified capacity isn't added to the RU spent at the on-demand rate.
Amount of data stored
In Serverless mode, data storage capacity is allocated automatically. The amount of stored data is calculated as the total amount of user and service data stored in the database. For example, creating a global index increases the total storage size by the index size.
For topics with on-demand pricing, you also pay for the actually used disk space. Its usage starts once each message is published in a topic and it's released once the retention period set for the topic expires.
Creating backups
Automatic backups
Managed Service for YDB automatically creates and stores two full backups for the last two days free of charge. No fee is charged for storing automatic backups.
On-demand backups
You can force a database backup, saving a copy to Object Storage. The cost of this operation depends on the size of copied data and is calculated similarly to the ReadTable operation. When calculating the cost, the actual amount is rounded up to a multiple of 1 GB.
Warning
If you export data using the ydb tools dump
utility, billing is based on the rates for the ReadTable
operation.
Example of calculating the cost of creating an on-demand backup
Below, you can find sample cost calculations for creating backups of 1GB and 10GB databases.
Cost calculation for a database of 1 GB
Actual (on-demand) consumption of RUs per month will be:
128 RU × 1024 = 131072 RU
Where:
- 128: Cost of request for 1 MB of data.
- 1024: Amount of data copied, in MB.
The number of RUs used (131072) is less than 1000000, so creating a backup will be free of charge.
Cost calculation for a database of 10 GB
Actual (on-demand) consumption of RUs per month will be:
128 RU × 1024 × 10 = 1310720 RU
Where:
- 128: Cost of request for 1 MB of data.
- 1,024 × 10: Amount of data copied, in MB.
The number of RUs used (1,310,720) exceeds 1,000,000, so the cost of creating a backup will be ₽21.3800 for 1,000,000 RUs.
(1,310,720 RU - 1,000,000 RU) / 1,000,000 × ₽21.3800 = ₽6.6431936
Total: ₽6.6432 is the cost of creating a backup of 10 GB of data.
Where:
- 1310720 RU is actual (on-demand) consumption of RUs per month.
- ₽21.3800: Cost of 1 million RUs.
Restoring data from backups
You can restore databases and individual tables from the backups stored in Object Storage. The cost of this operation depends on the size of recovered data and is calculated similarly to the BulkUpsert operation. When calculating the cost, the actual amount is rounded up to a multiple of 1 GB.
Warning
If you restore data using the ydb tools restore
utility, billing is based on the cost of writing a row to the DB for each restored row.
Example of calculating the cost of backup recovery
Below, you can find sample cost calculations for backup recovery for 1GB and 10GB databases.
Cost calculation for a database of 1 GB
Actual (on-demand) consumption of RUs per month will be:
0.5 RU × 1024 × 1024 = 524288 RU
Where:
- 0.5: Cost of request for 1 KB of data.
- 1024 × 1024: Amount of data recovered, in KB.
The number of RUs used (524288) is less than 1000000, so recovery from a backup will be free of charge.
Cost calculation for a database of 10 GB
Actual (on-demand) consumption of RUs per month will be:
0.5 RU × 1024 × 1024 × 10 = 5242880 RU
Where:
- 0.5: Cost of request for 1 KB of data.
- 1024 × 1024 × 10: Amount of data recovered, in KB.
The number of RUs used (5242880) exceeds 1000000, so the cost of recovery from a backup will be ₽21.3800 for 1000000 RUs.
(5242880 RU - 1000000 RU)/ 1000000 × ₽21.3800 = ₽90.7127744
Total: ₽90.7128 is the cost of recovery from a backup of 10 GB of data.
Where:
- 5242880 RU: Actual (on-demand) consumption of RUs per month.
- ₽21.3800: Cost of 1 million RUs.
Pricing
All prices are inclusive of VAT. Prices are given for a 30-day month. For shorter months, the cost is higher. For longer months, it is lower.
Data operations | Cost |
---|---|
Actual (on-demand) consumption of Request Units, less than 1 million per month | Free |
Actual (on-demand) consumption of Request Units, over 1 million per month | ₽21.38 per 1 million RUs |
Provisioned throughput capacity | ₽1.6000 per 100 RU/s×hour |
Other chargeable operations | Cost |
---|---|
Data storage, less than 1 GB per month | Free |
Data storage, over 1 GB per month | ₽21.38 per 1 GB per month |
Storage of on-demand backups in Yandex Object Storage | ₽2.0100 per 1 GB per month |
When using the service, you pay for traffic from Yandex Cloud to the internet. Traffic between internal IPs of Yandex Cloud services and incoming internet traffic is free.
The first 100 GB of outgoing traffic are provided free of charge every month.
The minimum billing unit is 1 MB.
Resource category | Cost of 1 GB |
---|---|
Outgoing traffic, 100 GB or less per month | Free |
Outgoing traffic, over 100 GB per month | ₽1.53 |