In this post, we will look at a new feature called Proximity Placement Group in Azure. This feature allows you to group your IaaS VMs within a single datacenter in an Azure Region.
An Azure Region is made up of multiple data centers that have low latency between them. An Azure Availability zone is made of two or more data centers with an Azure region and will have even lower latency between two VMs in two different Availability zones.
With this feature, you can deploy your VMs within the same datacenter for the lowest latency between your Azure IaaS VMs.
At the time of writing this article, Azure Proximity Placement Group is in preview in all regions except Japan East, Australia East, and India Central.
Now that we know and understand what an Azure Proximity Placement Group, let us go ahead and create one in our Azure subscription.
Since this feature is in preview, we won't be able to create one using the Azure Portal. However, we have a couple of ways to create PPG using PowerShell and Azure CLI.
In my example, I already have a Resource Group called "PPGGroupDemo" created which is where we will create the Azure Proximity Placement Group.
Using AZ CLI:
az ppg create --name EnterprisedaddyPPG --resource-group PPGGroupDemo --location westus2
Using PowerShell:
New-AzProximityPlacementGroup -Location westus2 -Name EnterprisedaddyPPG -ResourceGroupName PPGGroupDemo
To list the Azure Proximity Placement Group.
Using AZ CLI:
az ppg list -o table
Using PowerShell:
Get-AzProximityPlacementGroup
As a next step, let us create a VM and deploy it in the new PPG that we created earlier using the below command.
Using AZ CLI:
az vm create --name PPGVM1 --resource-group PPGGroupDemo --image UbuntuLTS --ppg EnterprisedaddyPPG --generate-ssh-keys --size Standard_D1_v2 --location westus2
Using PowerShell:
New-AzVm -ResourceGroupName $PPGGroupDemo -Name PPGVM2 -Location westus2 -ProximityPlacementGroup EnterprisedaddyPPG.Id
To list the VMs within a PPG, you can use the below commands.
Using AZ CLI:
az ppg show --name EnterprisedaddyPPG --resource-group PPGGroupDemo --query "virtualMachines"
Using PowerShell:
Get-AzProximityPlacementGroup -ResourceId EnterprisedaddyPPG.Id | Format-Table -Property VirtualMachines -Wrap
You can also create an Availability Set or Virtual Machine Scale Sets within an Azure Proximity Placement Group as of today using similar commands as above. Feel free to explore and let me know in case of any issues.
This is a really good feature in my opinion when the requirement is extremely low latency for IaaS related workloads but keep in mind that from an availability standpoint, there could be a single point of failure in case the data center goes down. So plan accordingly.
Also, the recommendation from Microsoft is that you plan with this well in advance and make sure that your VM types are available within a region. There are possibilities that the deployments might fail when a specific VM type is not available within a region.
I hope this has been informative and thank you for reading.