Understanding Autoscale Throughput in Azure Cosmos DB

Provisioning Autoscale containers and databases in Azure Cosmos DB is simple and helps our apps perform better.

az cosmosdb sql container create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyContainer --partition-key-path "/my/path" --idx @policy-file.json --ttl 1000 --max-throughput 4000
# Create an Azure Cosmos DB container with default indexes and autoscale throughput at 4000 RU
$resourceGroupName = "myResourceGroup"
$accountName = "mycosmosaccount"
$databaseName = "myDatabase"
$containerName = "myContainer"
$partitionKeyPath = "/myPartitionKey"
$autoscaleMaxThroughput = 4000 #minimum = 4000
New-AzCosmosDBSqlContainer `
-ResourceGroupName $resourceGroupName `
-AccountName $accountName `
-DatabaseName $databaseName `
-Name $containerName `
-PartitionKeyKind Hash `
-PartitionKeyPath $partitionKeyPath `
-AutoscaleMaxThroughput $autoscaleMaxThroughput

Microsoft Data Platform MVP. Software Engineer trying to build cool stuff using .NET and Azure. GitHub: https://github.com/willvelida