How to place Azure VMs close together with a Proximity Placement Group
An Azure Proximity Placement Group (PPG) is a logical group that asks Azure to place virtual machines and some compute resources close together in one data center. It can reduce network latency between VM tiers, but it does not reserve physical capacity or guarantee a latency. The added placement constraint can cause allocation failures, so decide whether latency is more important than resilience before using it. ([Microsoft Learn: Proximity Placement Groups](https://learn.microsoft.com/en-us/azure/virtual-machines/co-location))
How to place Azure VMs close together with a Proximity Placement Group
An Azure Proximity Placement Group (PPG) is a logical group that asks Azure to place virtual machines and some compute resources close together in one data center. It can reduce network latency between VM tiers, but it does not reserve physical capacity or guarantee a latency. The added placement constraint can cause allocation failures, so decide whether latency is more important than resilience before using it. (Microsoft Learn: Proximity Placement Groups)
A PPG is a placement constraint, not a recovery feature. Resources placed close together can be affected by an outage at that location. If resilience across zones matters more, distribute resources across zones and separately design data replication and traffic failover.
What resources does a PPG group?
A PPG is an Azure resource that you create first, then associate with VMs, availability sets, or Virtual Machine Scale Sets. Multiple compute tiers can use one PPG, allowing different VM sizes, such as front-end and back-end VMs, to request placement in the same data center. A PPG is not a reservation that pins capacity. Azure selects a data center when the first resource using the PPG is deployed. (Microsoft Learn: Proximity Placement Groups)
Hypothetical example: a single-zone application has a web tier and a data-processing tier whose request round trip is a bottleneck. Attaching both tiers to one PPG asks Azure to place them close together. It does not configure communication, replicate data, or switch traffic to healthy VMs. Measure latency along the real application path.
Why do deployment order and VM-size intent matter?
The data center selected when a PPG is first used depends on the first resource’s VM size and available capacity at that time. Adding a different size later can return OverconstrainedAllocationRequest if that data center cannot support it. If you plan to use several sizes, specify them in the optional PPG intent. The supported API version is 2021-11-01 or later. Intent helps Azure select a suitable data center, but it does not reserve capacity or guarantee deployment. (Microsoft Learn: PPG intent and deployment behavior)
Without intent, deploying several VM sizes together in one ARM template or deploying the most constrained size first can reduce compatibility problems. With intent, you can also specify one availability zone, but the zone can only be set when creating the PPG and only together with intent. Later VMs must use that zone.
How do capacity problems or misalignment appear?
Colocation narrows the physical locations Azure can use. Unsupported size combinations can produce OverconstrainedAllocationRequest; insufficient current resources can produce AllocationFailure. Deallocating a VM releases its capacity, so a later restart can fail. Planned hardware maintenance can also move resources and break alignment. A PPG is not a capacity reservation or an uptime guarantee. (Microsoft Learn: PPG behavior and maintenance)
Intent is not a permanent guarantee for every VM size. Hardware decommissioning or VM-family retirement can make a previously supported combination unavailable. Microsoft advises reviewing the error, current capacity and supported sizes; options may include updating intent or deallocating all resources and redeploying to another data center. Plan service impact and deployment order before moving resources.
How do you check alignment and recover?
Check PPG alignment in the portal, CLI, or PowerShell. Use az ppg show --include-colocation-status or Get-AzProximityPlacementGroup -ColocationStatus. Aligned means resources are within the same latency envelope. Unknown can mean at least one VM is deallocated; restart it successfully and check again. Not Aligned means one or more resources are outside the group’s alignment. (Microsoft Learn: check and realign resources)
For Not Aligned, deallocate affected resources and restart them to request realignment. If a VM belongs to an availability set or scale set, all VMs in that set might need to be deallocated first. If allocation constraints still prevent alignment, Azure may require deallocating every resource using the PPG, including currently aligned VMs. This affects capacity and availability, so plan a maintenance window. Verify Aligned again after restart and measure application latency.
What should you weigh before choosing a PPG?
Consider a PPG when low latency is essential and the required VM sizes can be placed in one data center. Its constraints can be a poor fit when zone-level failure isolation or elastic large-scale expansion matters more. Azure recommends keeping the solution within an availability zone when latency is the priority, and distributing VMs across zones when resilience is the priority. A single PPG cannot span availability zones. (Microsoft Learn: best practices)
Before adopting it, document required VM sizes and zones, scaling and redeployment frequency, recovery from misalignment, and a fallback for capacity shortages. After deployment, check alignment and actual round-trip latency, then recheck after restarts, maintenance, or scaling. Do not assume that a PPG provides replication, backups, cross-zone failover, or capacity reservation.
Official documentation
[Microsoft Learn: Proximity placement groups](https://learn.microsoft.com/en-us/azure/virtual-machines/co-location)
[Microsoft Learn: Create a proximity placement group in the portal](https://learn.microsoft.com/en-us/azure/virtual-machines/windows/proximity-placement-groups-portal)