在 Azure Cosmos DB 中的資料庫上佈建標準 (手動) 輸送量 - API for NoSQL

適用於:NoSQL

此文章說明如何在 Azure Cosmos DB for NoSQL 中的資料庫上佈建標準 (手動) 輸送量。 您可以佈建單一容器的輸送量,或是為資料庫佈建,並在其容器之間共用輸送量。 若要了解何時應使用容器層級和資料庫層級輸送量,請參閱在容器和資料庫上佈建輸送量的使用案例一文。 您可以使用 Azure 入口網站或 Azure Cosmos DB SDK 來佈建資料庫層級的輸送量。

如果您使用不同的 API,請參閱 API for MongoDBAPI for CassandraAPI for Gremlin 文章來佈建輸送量。

使用 Azure 入口網站佈建輸送量

  1. 登入 Azure 入口網站

  2. 建立新的 Azure Cosmos DB 帳戶,或選取現有的 Azure Cosmos DB 帳戶。

  3. 開啟 [資料總管] 窗格,然後選取 [新增資料庫]。 提供下列詳細資料:

    • 輸入資料庫識別碼。
    • 選取 [跨容器共用輸送量] 選項。
    • 選取 [自動調整] 或 [手動] 輸送量,然後輸入所需的 [資料庫輸送量] (例如,1000 RU/秒)。
    • 在 [容器識別碼] 下輸入容器的名稱
    • 輸入 [分割區索引鍵]
    • 選取 [確定]。

    Screenshot of New Database dialog box

使用 Azure CLI 或 PowerShell 佈建輸送量

若要建立具有共用輸送量的資料庫,請參閱

使用 .NET SDK 佈建輸送量

注意

您可以使用適用於 API for NoSQL 的 Azure Cosmos DB SDK 為所有 API 佈建輸送量。 您也可以選擇性地對 API for Cassandra 使用下列範例。

//set the throughput for the database
RequestOptions options = new RequestOptions
{
    OfferThroughput = 500
};

//create the database
await client.CreateDatabaseIfNotExistsAsync(
    new Database {Id = databaseName},  
    options);

下一步

請參閱下列文章,了解如何 Azure Cosmos DB 中佈建的輸送量: