Azure Cosmos DB 컨테이너에서 표준(수동) 처리량 프로비전 - API for NoSQL

적용 대상: NoSQL

이 문서에서는 Azure Cosmos DB for NoSQL의 컨테이너에서 표준(수동) 처리량을 프로비전하는 방법을 설명합니다. 단일 컨테이너 또는 데이터베이스의 처리량을 프로비저닝하고 데이터베이스 내부의 컨테이너와 처리량을 공유할 수 있습니다. Azure Portal, Azure CLI 또는 Azure Cosmos DB SDK를 사용하여 컨테이너의 처리량을 프로비저닝할 수 있습니다.

다른 API를 사용하는 경우 API for MongoDB, API for Cassandra, API for Gremlin 문서를 참조하여 처리량을 프로비전합니다.

Azure Portal

  1. Azure Portal에 로그인합니다.

  2. 새 Azure Cosmos DB 계정을 만들거나 기존 Azure Cosmos DB 계정을 선택합니다.

  3. 데이터 탐색기 창을 열어 새 컨테이너를 선택합니다. 다음으로, 다음과 같은 세부 정보를 제공합니다.

    • 새 데이터베이스를 만드는지 아니면 기존 데이터베이스를 사용하는지 표시합니다.
    • 컨테이너 ID를 입력합니다.
    • 파티션 키 값을 입력합니다(예: /ItemID).
    • 자동 크기 조정 또는 수동 처리량을 선택하고 필요한 컨테이너 처리량(예: 1000RU/s)을 입력합니다. 프로비저닝하려는 처리량을 입력합니다(예: 1000RU).
    • 확인을 선택합니다.

    Screenshot of Data Explorer, with New Collection highlighted

Azure CLI 또는 PowerShell

전용 처리량이 있는 컨테이너를 만들려면 다음을 참조하세요.

.NET SDK

참고 항목

API for NoSQL이 Cassandra 및 API for MongoDB를 제외한 모든 Azure Cosmos DB API의 처리량을 프로비저닝하도록 Azure Cosmos DB SDK를 사용합니다.

// Create a container with a partition key and provision throughput of 400 RU/s
DocumentCollection myCollection = new DocumentCollection();
myCollection.Id = "myContainerName";
myCollection.PartitionKey.Paths.Add("/myPartitionKey");

await client.CreateDocumentCollectionAsync(
    UriFactory.CreateDatabaseUri("myDatabaseName"),
    myCollection,
    new RequestOptions { OfferThroughput = 400 });

JavaScript SDK

// Create a new Client
const client = new CosmosClient({ endpoint, key });

// Create a database
const { database } = await client.databases.createIfNotExists({ id: "databaseId" });

// Create a container with the specified throughput
const { resource } = await database.containers.createIfNotExists({
id: "containerId",
throughput: 1000
});

// To update an existing container or databases throughput, you need to user the offers API
// Get all the offers
const { resources: offers } = await client.offers.readAll().fetchAll();

// Find the offer associated with your container or the database
const offer = offers.find((_offer) => _offer.offerResourceId === resource._rid);

// Change the throughput value
offer.content.offerThroughput = 2000;

// Replace the offer.
await client.offer(offer.id).replace(offer);

다음 단계

다음 문서를 참조하여 Azure Cosmos DB에서 처리량을 프로비저닝하는 방법을 알아보세요.