1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Getting Started with Azure Virtual Machines

Configuring Virtual Machines for High Availability

Start course
Overview
Difficulty
Beginner
Duration
28m
Students
895
Description

Microsoft Azure is one of the key platforms currently serving the cloud computing market. Since its launch in 2010, it has quickly matured, adding whole categories of critical services, including the flagship "Azure Virtual Machines" - an IaaS computing platform.

In this course, our Azure expert Ganapathi Subramanian will introduce the Azure Virtual Machine service and its features, focusing on Azure Windows and Linux virtual machines using Azure portal and powershell scripts, creating and managing custom Azure virtual machine images, configuring Azure virtual machines for high availability, understanding Azure virtual machine networking features, and configuring Azure virtual machine for monitoring and auto-scaling.

If you're not yet familiar with the platform, you might gain by taking Ganapathi's Introduction to Microsoft Azure before starting this course.

Do you have questions on this course? Contact our cloud experts in our community forum.

Transcript

Availability is an important characteristic of any IT system. In this lecture, we'll cover how Azure virtual machines can be configured for high availability. Azure virtual machine data are stored in disks. This diagram shows the high level disk architecture.

Azure Virtual Machine Disk types

An Azure virtual machine can be configured to use three types of disks. Operating system disks, which contains the operating system details and any changes made of the OS level are persistent in this disk. 

Temporary disk, which is by default marked as the D drive in the virtual machine. This disk should be used to store only temporary data as it is not persistent. All the data in this disk will be lost when the virtual machine is restarted.

Custom disks, additional disks, which may be attached to the virtual machine to store application data. Custom disks are designated by any drive letter except D. Custom disks are persistent in nature and can live through virtual machine restarts. All the disks used by virtual machines are built on top of Azure Storage. Azure Storage has built in redundancy, which enable the data to be recovered easily in case of failures. Azure storage-based disks support high scalability and availability to virtual machines.

Azure load balancing for High Availability

The availability of an application can be improved by distributing the load across many resources. Availability requirements of virtual machines can be addressed by distributing the load across virtual machines and load balancing them. The diagram shows a high level architecture of Azure load balancing. As seen from the diagram, Azure supports various levels and types of load balancing.

Let's go through them in detail. Azure supports load balancing at two levels. DNS level, this type of Azure load balancing can be used to load balance traffic across various Azure resources hosted in different regions. Azure traffic manager supports DNS-based load balancing and can also be used to managed traffic to non-Azure resources. Load balancing using traffic manager is charged based on the data transfer.

Network level, this type of Azure load balancing is applicable to virtual machines that are reaching over the Cloud service. Azure load balancers supports network level load balancing to virtual machines and is available, free of cost.

In this lecture, we'll focus on Azure load balancer based load balancing. When an Azure virtual machine is provisioned, it gets a public IP and a private IP. A public IP is internet accessible, whereas a private IP is visible only within the Azure environment. Azure load balances supports two types of load balancers. External load balancer (ELB) is meant for load balancing external or internet requests across cloud services. Typically ELB is configured as a web front end by distributing the traffic across public IPs.

Internal load balancer (ILB) is meant to load balanced traffic within the Azure environment using private IPs. ILB is usually applied at middle tier in a multi-tiered distributed scenario. ILB supports a secure way of load balancing by not exposing the public IP of the virtual machines.

What are Azure availability sets and fault domains

Azure virtual machines availability can be improved by efficiently using azure availability sets. Virtual machines created within an availability set support fault tolerance using azure fault domains. Virtual machines created within an availability set are distributed across fault domains.

Fault domains represent a group of virtual machines that share a common power source and network switch. Virtual machines deployed using an availability set support high fault tolerance by limiting the impact of unplanned events like power failure by distributing virtual machines across fault domains.

The diagram shows how availability sets can be used to configure virtual machines across tiers for fault tolerance and high availability by deploying the virtual machines in each tier in availability sets. Each tier is protected from unplanned failures.

Here's some of the best practices that can be followed while using virtual machines with azure availability sets. If you're using multiple virtual machines, it is highly recommended to place them in availability sets to support fault tolerance in high availability. If there are multiple tiers in an application. It is recommended to place each of the tiers in an azure availability set to improve the availability of each tier.

Combine Azure load balancing features with availability sets

Avoid using single instances with availability sets as Azure does not guarantee SLA for single instance deployment. In this demo, we'll learn how to create an availability set in two virtual machines within the availability set. You need at least two virtual machines for leveraging your availability set and load balancing. Let's create the first virtual machine. We'll go through only the important steps in configuring the availability sets as we've already seen the steps involved in creating a virtual machine in our previous lectures.

In the virtual machine create screen, you need to ensure that the create availability set option is selected in the availability sets action. Give a name to the availability set. Create a cloud service for the virtual machine and give it a name too. Complete the provisioning process for the first virtual machine.

Let's create the second virtual machine. Make sure that the second virtual machine is created within the availability set we created earlier by selecting it from the drop down list. Complete the provisioning process for the second virtual machine. Now we have created two virtual machines within an availability set. Azure platform will make sure that the virtual machines are deployed under different fault domains. Thus, improving of the overall availability.

Let's configure load balancing for the virtual machines using a load balancing set. Select the first virtual machine in the portal and go to the end point's configuration tab. Let's create an HTTP end point for the virtual machine. Let's also create a load balancing set and give it a name. We'll repeat the same steps for the second virtual machine and configure the same load balancing set by selecting it from the drop down list.

Now the two virtual machines are configured for load balancing. Let's test the azure load balancing behavior of the virtual machines by invoking the pages in the virtual machines. As you can see, every time you request a page it's being served from different virtual machines.

About the Author

Trevor Sullivan is a Microsoft MVP for Windows PowerShell, and enjoys working with cloud and automation technologies. As a strong, vocal veteran of the Microsoft-centric IT field since 2004, Trevor has developed open source projects, provided significant amounts of product feedback, authored a large variety of training resources, and presented at IT functions including worldwide user groups and conferences.