Pricing policy for Serverless mode in Managed Service for YDB
Tip
For a cost calculation, use our calculator on the Yandex Cloud website or check out the pricing below.
The prices for service products are also available in the price list.
Note
Currency of Service rates (prices) depends on the company you made a contract with:
- Prices in US dollars are applicable to customers of Iron Hive doo Beograd (Serbia) or Direct Cursus Technology L.L.C. (Dubai).
- Prices in Russian roubles are applicable to customers of Yandex.Cloud LLC.
All prices below do not include VAT.
When using Managed Service for YDB in Serverless mode, you pay for each request to the database. You do not have to specify which resources you need since the database quickly adjusts to changes in the workload. Apart from the requests, you also pay for the data stored in Managed Service for YDB on an hourly basis. Other operations, such as recovery from a backup, are charged extra.
What goes into the cost of using the Serverless mode in Managed Service for YDB
When running Managed Service for YDB in Serverless mode, you pay for:
- Data operations.
- Amount of stored data, including service data, such as indexes.
- Additional user operations, such as recovery from a backup.
The following resources are paid additionally:
- Space used in Yandex Object Storage to store on-demand backups.
- Outgoing traffic from Yandex Cloud to the internet.
In all calculations, 1 GB = 210 MB = 220 KB = 230 bytes.
Data operations and request units
In Serverless mode, Yandex Managed Service for YDB can work with data in several ways:
- YQL: SQL dialect to work with relational tables supported by the SDK
, CLI , and the YDB management console. - Document API: Amazon’s 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 RUs. The total cost of all executed requests to YDB is the sum of the RU costs for each request.
Below, you can find the rules for calculating the cost of requests to YDB in RUs:
Pricing for Request Unit consumption
- Actual consumption (on-demand). The cost of using YDB for a certain period is the number of spent RUs multiplied by the price per RU minus the monthly free package. If there were no requests to the database or if the amount of RUs spent in the current month is less than the free package, there is no charge for the 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 for some (or all) RUs you spent on an hourly basis. To do this, set a non-zero value of the Provisioned capacity, RU/s property. After that, you will be charged according to a special pricing plan, the rate for which is set to RU/s per hour, with billing per second. The RUs consumed within the specified capacity are not added to the RUs spent at the on-demand rate.
Amount of stored data
In Serverless mode, data storage capacities are 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 is 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 ydb tools dump, the billing is based on the ReadTable operation pricing.
Example of calculating the cost of creating an on-demand backup
Let's calculate the cost of creating backups of 1 GB and 10 GB databases.
Cost calculation for a 1 GB database
Actual (on-demand) consumption of RUs per month will be:
128 RUs × 1,024 = 131,072 RUs
Where:
- 128: Cost of request for 1 MB of data.
- 1,024: Amount of copied data, in MB.
The number of RUs spent (131,072) is less than 1,000,000, so creating a backup will be free of charge.
Cost calculation for a 10 GB database
Actual (on-demand) consumption of RUs per month will be:
128 RUs × 1,024 × 10 = 1,310,720 RUs
Where:
- 128: Cost of request for 1 MB of data.
- 1,024 × 10: Amount of copied data, in MB.
The number of spent RUs (1,310,720) exceeds 1,000,000, so the cost of creating a backup will be $0.192420 for 1,000,000 RUs.
(1,310,720 RUs - 1,000,000 RUs) / 1,000,000 × $0.192420 = $0.059789
Total: $0.059789, cost of creating a 10 GB backup.
Where:
- 1,310,720 RUs: Actual (on-demand) consumption of RUs per month.
- $0.192420: Price per 1 million RUs.
Recovery from a backup
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 ydb tools restore, billing is based on the cost of writing a row to the DB for each restored row.
Example of calculating the cost of recovery from a backup
Let's calculate the cost of backup recovery for 1 GB and 10 GB databases.
Cost calculation for a 1 GB database
Actual (on-demand) consumption of RUs per month will be:
0.5 RUs × 1,024 × 1,024 = 524,288 RUs
Where:
- 0.5: Cost of request per KB of data.
- 1,024 × 1,024: Amount of recovered data, in KB.
The number of RUs spent (524,288) is less than 1,000,000, so recovery from a backup will be free of charge.
Cost calculation for a 10 GB database
Actual (on-demand) consumption of RUs per month will be:
0.5 RUs × 1,024 × 1,024 × 10 = 5,242,880 RUs
Where:
- 0.5: Cost of request for 1 KB of data.
- 1,024 × 1,024 × 10: Amount of data being recovered, in KB.
The number of spent RUs (5,242,880) exceeds 1,000,000, so the cost of recovery from a backup will be $0.192420 for 1,000,000 RUs.
(5,242,880 RUs - 1,000,000 RUs) / 1,000,000 × $0.192420 = $0.816415
Total: $0.816415, the cost of recovery from a backup of 10 GB of data.
Where:
- 5,242,880 RUs: Actual (on-demand) consumption of RUs per month.
- $0.192420: Price per 1 million RUs.
Prices for the Russia region
Note
Yandex Cloud resources are priced differently in different regions. For more information about the available regions, see Regions.
Your payment currency is determined by your contracting legal entity. For more information on creating an account, see Registering an account in Yandex Cloud.
Outbound traffic
When using the service, you pay for traffic from Yandex Cloud to the internet. Traffic between internal IP addresses of Yandex Cloud services and incoming internet traffic is free.
The first 100 GB of outgoing traffic per month are free of charge.
The minimum billing unit is 1 MB.