Azure Cosmos DB 中的定价模型Pricing model in Azure Cosmos DB

Azure Cosmos DB 的定价模型可简化成本管理和计划。The pricing model of Azure Cosmos DB simplifies the cost management and planning. 使用 Azure Cosmos DB 时,需要为预配的吞吐量和消耗的存储支付费用。With Azure Cosmos DB, you pay for the throughput provisioned and the storage that you consume.

  • 预配的吞吐量:预配的吞吐量(也称为预留吞吐量)可保证提供任何规模的高性能。Provisioned Throughput: Provisioned throughput (also called reserved throughput) guarantees high performance at any scale. 指定所需的吞吐量 (RU/s),Azure Cosmos DB 提供所需资源来保证配置的吞吐量。You specify the throughput (RU/s) that you need, and Azure Cosmos DB dedicates the resources required to guarantee the configured throughput. 按指定时间内最大的预配吞吐量以小时来收费。You are billed hourly for the maximum provisioned throughput for a given hour.


    由于预配的吞吐量模型会将资源提供给容器或数据库,因此即使不运行任何工作负载,也要为预配的吞吐量付费。Because the provisioned throughput model dedicates resources to your container or database, you will be charged for the provisioned throughput even if you don't run any workloads.

  • 使用的存储:按指定时间内用于数据和索引的总存储量 (GBs) 来收取统一费用。Consumed Storage: You are billed a flat rate for the total amount of storage (GBs) consumed for data and the indexes for a given hour.

预配的吞吐量按每秒的请求单位数(即 RU/s)指定,允许从容器中读取数据或者将数据写入容器或数据库。Provisioned throughput, specified as Request Units per second (RU/s), allows you to read from or write data into containers or databases. 可以在数据库或容器上预配吞吐量You can provision throughput on either a database or a container. 根据工作负荷需求,可以随时调整吞吐量的大小。Based on your workload needs, you can scale throughput up/down at any time. Azure Cosmos DB 的定价是弹性的,且与数据库或容器上配置的吞吐量成正比。Azure Cosmos DB pricing is elastic and is proportional to the throughput that you configure on a database or a container. 最小吞吐量和存储值以及规模增量为所有客户(从小型容器到大型容器)提供全面的价格和弹性范围。The minimum throughput and storage values and the scale increments provide a full range of price vs. elasticity spectrum to all segments of customers, from small scale to large-scale containers. 对于以 100 RU/s 为单位预配的、最少为 400 RU/s 的吞吐量和以 GB 消耗的存储,每个数据库或容器按小时计费。Each database or a container is billed on an hourly basis for the throughput provisioned in the units of 100 RU/s, with a minimum of 400 RU/s, and storage consumed in GBs. 不同于预配的吞吐量,存储按消耗进行计费。Unlike provisioned throughput, storage is billed on a consumption basis. 也就是说,无需提前预留任何存储。That is, you don't have to reserve any storage in advance. 仅为所使用的存储付费。You are billed only for the storage you consume.

有关详细信息,请参阅 Azure Cosmos DB 定价页了解 Azure Cosmos DB 帐单For more information, see the Azure Cosmos DB pricing page and Understanding your Azure Cosmos DB bill.

Azure Cosmos DB 中的定价模型在所有 API 中都是一致的。The pricing model in Azure Cosmos DB is consistent across all APIs. 有关详细信息,请参阅 Azure Cosmos DB 定价模型如何对客户而言更具经济效益To learn more, see How Azure Cosmos DB pricing model is cost-effective for customers. 数据库或容器需要最小吞吐量来确保 SLA,可以按每 100 RU/秒 37.94 元的价格增加或减少预配的吞吐量。There is a minimum throughput required on a database or a container to ensure the SLAs and you can increase or decrease the provisioned throughput by CNY37.94 for each 100 RU/s.

目前,基于数据库和容器的吞吐量的最低价格是 151.76 元/月(请参阅 Azure Cosmos DB 定价页,了解最新信息)。Currently the minimum price for both database and the container-based throughput is CNY151.76/month (see the Azure Cosmos DB pricing page for latest information. 如果工作负荷使用多个容器,那么可以通过使用数据库级别的吞吐量来优化成本,因为数据库级别的吞吐量使得数据库中的任意数量的容器可以在容器之间共享吞吐量。If your workload uses multiple containers, it can be optimized for cost by using database level throughput because database level throughput allows you to have any number of containers in a database sharing the throughput among the containers. 下表总结了预配的吞吐量和不同实体的成本:The following table summarizes provisioned throughput and the costs for different entities:

实体Entity 最小吞吐量和成本Minimum throughput & cost 规模增量和成本Scale increments & cost 预配范围Provisioning Scope
数据库Database 400 RU/秒(151.76 元/月)400 RU/s (CNY151.76/month) 100 RU/秒(37.94 元/月)100 RU/s (CNY37.94/month) 吞吐量预留给数据库,并由数据库中的容器共享Throughput is reserved for the database and is shared by containers within the database
容器Container 400 RU/秒(151.76 元/月)400 RU/s (CNY151.76/month) 100 RU/秒(37.94 元/月)100 RU/s (CNY37.94/month) 吞吐量预留给特定容器Throughput is reserved for a specific container

如上表所示,Azure Cosmos DB 的最低吞吐量起步价为 151.76 元/月。As shown in the previous table, the minimum throughput in Azure Cosmos DB starts at a price of CNY151.76/month. 如果你从最低吞吐量开始,并随着时间的推移逐步增加吞吐量以支持生产工作负荷,则成本将以每月 37.94 元的增量平稳增长。If you start with the minimum throughput and scale up over time to support your production workloads, your costs will rise smoothly, in the increments of CNY37.94/month. Azure Cosmos DB 的定价模型是弹性的,按比例增加或减少时,价格会平稳地上升或下降。The pricing model in Azure Cosmos DB is elastic and there is a smooth increase or decrease in the price as you scale up or down.

免费试用 Azure Cosmos DBTry Azure Cosmos DB for free

Azure Cosmos DB 免费为开发人员提供多个选项。Azure Cosmos DB offers several options for developers to it for free. 这些选项包括:These options include:

  • Azure 试用帐户:Azure 提供了一个免费层,它在前 30 天为你提供了价值人民币 1500 元的 Azure 额度。Azure trial account: Azure offers a free tier that gives you CNY 1500 in Azure credits for the first 30 days.
  • Azure Cosmos DB 模拟器:为方便进行开发,Azure Cosmos DB 模拟器提供了一个模拟 Azure Cosmos DB 服务的本地环境。Azure Cosmos DB emulator: Azure Cosmos DB emulator provides a local environment that emulates the Azure Cosmos DB service for development purposes. 模拟器免费提供,并且具有对云服务的高保真度。Emulator is offered at no cost and with high fidelity to the cloud service. 使用 Azure Cosmos DB 模拟器可在本地开发和测试应用程序,无需创建 Azure 订阅且不会产生任何费用。Using Azure Cosmos DB emulator, you can develop and test your applications locally, without creating an Azure subscription or incurring any costs. 投入生产之前,可以在本地使用模拟器开发应用程序。You can develop your applications by using the emulator locally before going into production. 如果对模拟器的应用程序功能感到满意,可切换到云中的“使用 Azure Cosmos DB 帐户”,从而大幅节省成本。After you are satisfied with the functionality of the application against the emulator, you can switch to using the Azure Cosmos DB account in the cloud and significantly save on cost. 有关模拟器的详细信息,请参阅使用 Azure Cosmos DB 进行开发和测试一文。For more information about emulator, see Using Azure Cosmos DB for development and testing article for more details.

后续步骤Next steps

可在以下文章中了解更多关于优化 Azure Cosmos DB 资源成本的信息:You can learn more about optimizing the costs for your Azure Cosmos DB resources in the following articles: