Azure CosmosDB AutoScaling Using Code/Automation

scorpion5211

Is it possible to autoscale the CosmosDB throughput using either c# or Azure Automation? Please provide a sample example.

Rafat Sarosh

Storage is automatically scaled. Here is the code to change the throughput automatically

//Fetch the resource to be updated
Offer offer = client.CreateOfferQuery()
                  .Where(r => r.ResourceLink == collection.SelfLink)    
                  .AsEnumerable()
                  .SingleOrDefault();

// Set the throughput to 2500 request units per second
offer = new OfferV2(offer, 2500);

//Now persist these changes to the database by replacing the original resource
await client.ReplaceOfferAsync(offer);

See more here: https://docs.microsoft.com/en-us/azure/cosmos-db/set-throughput

HTH

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Azure AutoScaling

分類Dev

Azure scaling and autoscaling fails

分類Dev

Azure AutoScaling管理API

分類Dev

Azure RUs on cosmosDB

分類Dev

Azure RUs on cosmosDB

分類Dev

Azure cosmosDBでExpress

分類Dev

Are Azure CosmosDB indexes split by partition

分類Dev

Azure Table StorageとCosmosDB Table API

分類Dev

Azure Table StorageとCosmosDB Table API

分類Dev

Azure Table StorageとCosmosDB Table API

分類Dev

How to query from cosmosdb in azure function with typescript

分類Dev

Azure CosmosDBを一括挿入

分類Dev

Using callback with CosmosDb Node.js SDK?

分類Dev

Azure関数のCosmosDBに対するSQLInjection

分類Dev

Azure TableStorageとPythonを使用したCosmosDB

分類Dev

Cannot connect to CosmosDB from VS Code Azure Function

分類Dev

Is there any way to view current index state in Azure CosmosDB

分類Dev

Azure CosmosDBとのオフライン同期

分類Dev

Azure Functions, CosmosDB Trigger: How to store connection string in keyvault

分類Dev

Azure CosmosDBのモデリング

分類Dev

Azure Function Javascript(NodeJS)CosmosDBクエリ

分類Dev

Azure CosmosDBでPartitionKeyを選択する

分類Dev

Azure cosmosdbの一括インポート

分類Dev

Azure CosmosDB-Whereクエリの動的OR句

分類Dev

Azure CosmosDB - 増分バックアップ

分類Dev

Azure CosmosDBでのMongoDB $ sortbycountの回避策

分類Dev

AWS - how to pass a service link role to an autoscaling group using CDK/CloudFormation?

分類Dev

Azure CosmosDBでLIKEクエリを作成する方法

分類Dev

PythonでAzureのCosmosDBからデータを読み取る方法