You can create an Azure job that scales the bandwidth of your collections only when you need it, and then shrink down.
If you are targeting DocumentDB with .NET, this Azure article contains sample code that shows how to change throughput using the .NET SDK.
The specific (C # .NET) code provided in the article is as follows:
Offer offer = client.CreateOfferQuery()
.Where(r => r.ResourceLink == collection.SelfLink)
.AsEnumerable()
.SingleOrDefault();
offer = new OfferV2(offer, 5000);
await client.ReplaceOfferAsync(offer);
offer = new Offer(offer);
offer.OfferType = "S2";
await client.ReplaceOfferAsync(offer);
I assume that the DocumentDB SDK for other languages โโwill have the same function.
Additionally, from an Azure article found here , you can use PowerShell to change the level of service.
$ResourceGroupName = "resourceGroupName"
$ServerName = "serverName"
$DatabaseName = "databaseName"
$NewEdition = "Standard"
$NewPricingTier = "S2"
$ScaleRequest = Set-AzureRmSqlDatabase -DatabaseName $DatabaseName - ServerName $ServerName -ResourceGroupName $ResourceGroupName -Edition $NewEdition -RequestedServiceObjectiveName $NewPricingTier
source
share