An Azure service that provides cloud-scale job scheduling and compute management.
Hello JeffreyCMI,
Thank you for the clarification. You are correct that the re-provisioning attempt for the preempted Spot node is separate from the Batch autoscale evaluation.
From the Compute side, after the Spot VM is preempted, the underlying VM is deleted, so VM compute charges stop. However, associated resources such as managed disks, public IP addresses, and load-balancer rules may continue to incur charges while they remain allocated.
Azure Batch keeps the node record in the Preempted state and may attempt to restore the Spot capacity for up to 48 hours. The preempted node can therefore continue to count towards the pool target, even though it cannot run tasks.
Your use of $PreemptedNodeCount to add replacement capacity is a reasonable workaround for avoiding task starvation. The exact interaction between the Batch autoscale calculation and the retained preempted node is owned by the Azure Batch service rather than the Compute platform.
Thank you for sharing the detailed observations and billing breakdown. This distinction will also help other customers using Spot nodes with Batch autoscaling.