【问题标题】:What does the offerThroughput option do when creating an Azure Cosmos DB container?创建 Azure Cosmos DB 容器时,offerThroughput 选项有什么作用?
【发布时间】:2022-06-11 00:03:00
【问题描述】:

文档提供了几种在以编程方式创建容器时指定吞吐量的不同方法。以下每种配置有何不同?

// A. Create with default throughput?
const { container } = await database.containers.createIfNotExists({ id: 'gizmos' });
// B. Create with fixed throughput?
const { container } = await database.containers.createIfNotExists({ id: 'gizmos', throughput: 400 });
// C. Create with "maxThroughtput"?
const { container } = await database.containers.createIfNotExists({ id: 'gizmos', maxThroughput: 400 });
// D. Create with "offerThroughput"?
const { container } = await database.containers.createIfNotExists({ id: 'gizmos' }, { offerThroughput: 400 });

API 文档的细节非常少... Azure Cosmos SDK for JavaScript | Containers.createIfNotExists()

【问题讨论】:

    标签: node.js azure-cosmosdb azure-cosmosdb-sqlapi


    【解决方案1】:

    offerThroughput 指定容器的 RU/s 量或吞吐量。

    JS SDK 文档没有提供关于这个主题的详尽解释。如果您是 Cosmos DB 的新手,我建议您查看这些 articles on throughput,它们提供了更深入的解释。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-20
      • 2023-01-30
      • 2021-02-13
      • 1970-01-01
      • 1970-01-01
      • 2020-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多