Azure has more regions than any cloud providers, and this means you can deploy your services all over the world. Each region comprises multiple availability zones (for a maximum of three), and each zone consists of multiple datacenters. You can use this to create a highly available architecture. In Azure, the regions are grouped together to create geographies.
When you create a VM in Azure, you can choose to which region you need to deploy this VM. This helps in keeping the VMs closer to your customer base. While planning the location, you need to take into account the following considerations:
Availability of Services Not all services are supported in all regions. You need to check the following and verify if the region supports the service:
https://azure.microsoft.com/en-in/global-infrastructure/services
Pricing The price of Azure services varies by region. If you are flexible with the location and the performance metrics, then feel free to deploy the resource in a cheaper region.
Compliance Verify if your organization has any location restrictions or policies that limit the deployment to a certain region. For example, due to GDPR, organizations cannot store data of European customers outside the European Union.
When it comes to pricing, the following are the costs associated with a VM:
Compute Costs This is the cost for the compute resources (CPU and memory), and this is billed on an hourly basis. If you run your VM for 120 minutes, you pay for two hours of usage. Once you deallocate the VM and release the hardware allocated, you are no longer charged for the compute. One thing to keep in mind here is if you shut down the VM from the operating system—for example, by clicking the Windows button and select Shutdown—then you will be charged for the VM as the hardware allocated is not released.
License Cost When you are choosing an operating system that requires a license (Windows Server, RHEL, SUSE), then you will see the license cost for your VM. You can use your existing licenses purchased from Software Assurance to cut down this cost. This reduction method is called Azure Hybrid Benefit (AHUB). AHUB can be used for Windows, Linux (RHEL and SUSE), and SQL virtual machine licenses. There are several operating systems that don’t require a license such as Ubuntu and CentOS; for these VMs you will not see the license cost.
Storage Cost This is the cost for the storage that your VM consumes. When we discuss the storage options later in this chapter, we will cover the different storage tiers. The cost of the storage has no relation to the status of the VM; this means you will still be charged for the storage even if the VM is in a deallocated state.
Network Cost This includes the cost for the public IP address if your VM is using a public IP address. In Azure Cost Management, you will see that the cost of the public IP address is mapped to the public IP resource. Nevertheless, since you are using it for the VM, you can consider it an expense for the VM.
Two payment methods are available when it comes to purchasing virtual machines.
Consumption-Based In a consumption-based model, you pay for what you use; this is called the pay-as-you-go model. This is ideal for virtual machines that you deploy for a short term or for testing purposes.
Reserved Instances This is ideal for production workloads meant to run for a longer period, at least for a year. Using reserved instances (RIs), you can pay the cost of the compute in an upfront or monthly manner. Since you are making this commitment, you will see up to a 72 percent discount in the cost compared to the consumption-based model.