kumar
kumar

Reputation: 9387

numbers of zones in an azure availability zone Region

Is there a way to find out how many zones are then per availability zone Region. does it always 3 zones per availability one? Are there regions where there are more than 3 zones per availability zone?

Upvotes: 5

Views: 2971

Answers (2)

Slava
Slava

Reputation: 743

When we speak about Availability Zones, we usually mean a service reliability and we can check Azure service reliability guides.

For example - Reliability in Virtual Machines

Virtual machines support availability zones with three availability zones per supported Azure region and are also zone-redundant and zonal. For more information, see Azure services with availability zones.

And Availability options for Azure Virtual Machines also has useful information.

Related to the AZ, we could check the following information


And some useful queries using Azure CLI to get list of Regions and AZ for instances

# List supported regions for the current subscription
az account list-locations --output table

# Regions
az account list-locations \
  --query '[?type==`Region`].{"Geography group":metadata.geographyGroup, Name:name, "Display Name":displayName, Geography:metadata.geography, Location:metadata.physicalLocation, Category:metadata.regionCategory, Type:type, "Region type":metadata.regionType}' \
  --output table

# Physical regions
az account list-locations \
  --query 'sort_by([?metadata.regionType==`Physical`].{"Geography group":metadata.geographyGroup, Name:name, "Display Name":displayName, Geography:metadata.geography, Location:metadata.physicalLocation, Category:metadata.regionCategory, Type:type, "Region type":metadata.regionType}, &"Geography group")' \
  --output table

# Europe regions
az account list-locations \
  --query '[?metadata.geographyGroup==`Europe`].{"Geography group":metadata.geographyGroup, Name:name, "Display Name":displayName, Geography:metadata.geography, Location:metadata.physicalLocation, Category:metadata.regionCategory, Type:type, "Region type":metadata.regionType}' \
  --output table

 # Check all instances in a region
 az vm list-sizes -l eastus2 --query '[].{Name:name, Cores:numberOfCores, Memory:memoryInMB, "OS Disk":osDiskSizeInMB, "Resource Disk":resourceDiskSizeInMB}' --output table

 # Check AZ for instance type in all regions
 az vm list-skus --zone --size standard_b1s --output table

 # Check AZ for instance type in a region
 az vm list-skus --location eastus2 --zone --size standard_b1s --output table

There is no a direct API to list all AZ, but if we would like to run a VM and check available options, we can use az vm list-skus. It returns all supported resources (we check just VM) types and availability per Region/AZ. We can group and merge that data to get an overview about existing AZ.

# List availability zones (~ 25 seconds, ~ 57 MB)
az vm list-skus --zone --resource-type virtualMachines \
  | jq -r '
  [group_by(.locationInfo[].location | ascii_upcase)[]
  | { Location: .[0].locationInfo[].location,
   Count:[.[] | .locationInfo[].zones] | add | unique | length,
   Zones: [.[] | .locationInfo[].zones] | add | sort | unique | join(" ") }]
  | to_entries | (["#", "Location", "Count", "Zones"]
  | (., map(length*"-"))), (.[] |[.key, .value.Location, .value.Count, .value.Zones])
  | @tsv' \
  | column -ts$'\t'
#   Location            Count  Zones
-   --------            -----  -----
0   australiaeast       3      1 2 3
1   brazilsouth         3      1 2 3
2   CanadaCentral       3      1 2 3
3   CentralIndia        3      1 2 3
4   centralus           3      1 2 3
5   eastasia            3      1 2 3
6   eastus              3      1 2 3
7   eastus2             3      1 2 3
8   EastUS2EUAP         3      1 2 3
9   FranceCentral       3      1 2 3
10  GermanyWestCentral  3      1 2 3
11  IsraelCentral       3      1 2 3
12  ItalyNorth          3      1 2 3
13  japaneast           3      1 2 3
14  KoreaCentral        3      1 2 3
15  MexicoCentral       3      1 2 3
16  NewZealandNorth     3      1 2 3
17  northeurope         3      1 2 3
18  NorwayEast          3      1 2 3
19  PolandCentral       3      1 2 3
20  QatarCentral        3      1 2 3
21  SouthAfricaNorth    3      1 2 3
22  southcentralus      3      1 2 3
23  southeastasia       3      1 2 3
24  SpainCentral        3      1 2 3
25  SwedenCentral       3      1 2 3
26  SwitzerlandNorth    3      1 2 3
27  UAENorth            3      1 2 3
28  uksouth             3      1 2 3
29  westeurope          3      1 2 3
30  westus2             3      1 2 3
31  WestUS3             3      1 2 3

Upvotes: 0

justsomeguy
justsomeguy

Reputation: 559

This can help you see the regions:

az account list-locations -o table

According to the cli documentation, it appears there are 3 per region [--zone {1, 2, 3}] as shown below, since it enumerates zones 1, 2, and 3 as options when you do an az vm create command that would include --location and --zone

az vm create --name
             --resource-group
             [--accelerated-networking {false, true}]
             [--admin-password]
             [--admin-username]
             [--asgs]
             [--assign-identity]
             [--attach-data-disks]
             [--attach-os-disk]
             [--authentication-type {all, password, ssh}]
             [--availability-set]
             [--boot-diagnostics-storage]
             [--computer-name]
             [--custom-data]
             [--data-disk-caching]
             [--data-disk-sizes-gb]
             [--ephemeral-os-disk {false, true}]
             [--generate-ssh-keys]
             [--image]
             [--license-type {None, Windows_Client, Windows_Server}]
             [--location]
             [--nics]
             [--no-wait]
             [--nsg]
             [--nsg-rule {RDP, SSH}]
             [--os-disk-caching {None, ReadOnly, ReadWrite}]
             [--os-disk-name]
             [--os-disk-size-gb]
             [--os-type {linux, windows}]
             [--plan-name]
             [--plan-product]
             [--plan-promotion-code]
             [--plan-publisher]
             [--ppg]
             [--private-ip-address]
             [--public-ip-address]
             [--public-ip-address-allocation {dynamic, static}]
             [--public-ip-address-dns-name]
             [--public-ip-sku {Basic, Standard}]
             [--role]
             [--scope]
             [--secrets]
             [--size]
             [--ssh-dest-key-path]
             [--ssh-key-values]
             [--storage-account]
             [--storage-container-name]
             [--storage-sku]
             [--subnet]
             [--subnet-address-prefix]
             [--subscription]
             [--tags]
             [--ultra-ssd-enabled {false, true}]
             [--use-unmanaged-disk]
             [--validate]
             [--vnet-address-prefix]
             [--vnet-name]
             [--zone {1, 2, 3}]

Source: https://learn.microsoft.com/en-us/cli/azure/cloud?view=azure-cli-latest#az-cloud-list ~

Upvotes: 0

Related Questions