Search code examples
azureautoscalingazure-batchcost-management

Azure Batch Pricing for scaling up and down within an hour


What is the pricing model when autoscaling an Azure Batch cluster up and down within the same hour?

For instance if a vm costs $x per hour and I scale my cluster up to 10 vms, then down to 0, then up to 12 within 1 hour, how many vms do I get charged for?


Solution

  • To my understanding of Azure VM pricing, pricing is listed by the hour, but billing occurs by the minute - rounded down, so 52:43 of usage would be billed as 52 minutes, so your cost for that machine would be:

    VM hourly cost * number of VMs for a given period * number of minutes used in that period / 60

    In your case, you scale up to 10 VMs, you need to establish how long you're at that level. Then, how long are you at 12 VMs? Apply the formula above each time and add.