Azure VM High Availability ? (Part-1 : VM ScaleSet)

Aammir Mirza
8 min readSep 15, 2023

--

Lets cover VM Scale Set, Availability Zone, Availability Sets, and Regions in Azure?

High availability (HA) is a critical aspect of cloud computing that offers several advantages for businesses and organizations. Here are some of the key advantages of high availability in cloud computing:

1. Reduced Downtime: High availability ensures that your applications and services are accessible and operational for an extended period. This means minimal downtime, which is crucial for businesses that rely on 24/7 access to their services. Reduced downtime leads to increased productivity and customer satisfaction.

2. Improved Reliability: Cloud providers typically have redundant infrastructure across multiple data centers and regions. This redundancy minimizes the risk of hardware failures or other localized issues causing service disruptions. Data and applications are replicated and distributed, making them more reliable.

3. Scalability: High availability is often associated with scalability. Cloud providers offer on-demand resources that can automatically scale based on demand. This means that as your application experiences increased traffic or workloads, additional resources can be provisioned to handle the load, maintaining high availability.

4. Disaster Recovery: High availability often includes robust disaster recovery mechanisms. Data and services are backed up and replicated in different geographical locations, ensuring that in the event of a catastrophic failure or natural disaster, your data and services can be quickly restored.

5. Cost Optimization: While implementing high availability may involve some upfront costs, it can ultimately save money in the long run. Downtime can be costly in terms of lost revenue, reputation damage, and recovery expenses. High availability helps minimize these costs by reducing downtime.

6. Global Reach: High availability configurations can span multiple regions and even countries, allowing your services to be accessible to a global audience. This is essential for businesses with an international presence or those looking to expand globally.

7. Load Balancing: High availability often includes load balancing mechanisms that distribute incoming traffic across multiple servers or instances. This not only improves performance but also ensures that if one server fails, others can seamlessly take over, maintaining service availability.

8. Security: Many high-availability setups include security features such as encryption and access controls. These help protect your data and services from unauthorized access and cyber threats, enhancing overall security.

9. Automatic Failover: High availability configurations often include automatic failover mechanisms. If one component or server fails, traffic is automatically redirected to healthy components, minimizing service disruption and the need for manual intervention.

10. Competitive Advantage: Offering high availability can give your business a competitive edge. It demonstrates a commitment to providing reliable services to your customers, which can enhance your reputation and customer loyalty.

What is VMSS (Virtual Machine Scale Set)?

Azure’s Virtual Machine Scale Sets (VMSS) is a service for creating and managing auto-scaling sets of similar VMs. These clusters of VMs are easily handled as a single unit by IT administrators. VMSS can be configured through JSON templates, the Azure portal, and REST APIs. It’s a highly available Azure Cloud Service, capable of automatically adjusting the number of VM instances based on demand or schedules. VMSS is particularly valuable for large-scale services, such as computation, big data, and container workloads. Automatic scaling reduces application monitoring, allowing users to add or remove VM instances based on rules and schedules. Azure VM Scale Sets are ideal for comprehensive Azure services, simplifying the management of VM groups, especially in scenarios like big data processing and customer-facing web applications. To set up Azure VM Scale Sets, administrators define sets using Azure CLI, Azure console, or PowerShell, configuring parameters like VM instances and network attributes. Combining VMSS with Azure services like Autoscale enables resource scaling based on workload changes. Note that VMs within a scale set are not assigned public IP addresses, as the scale set typically has a front-end balancer with a public IP address that connects to the underlying VMs. VMSS operates within a VNET, and individual VMs do not have public IP assignments.

Azure’s Virtual Machine Scale Sets (VMSS) streamlines the management of auto-scaling, similar VMs. These instances adapt based on set conditions. Widely used by cloud administrators, it clusters unique VMs in Azure’s public cloud. Administrators can manage them collectively and create them via JSON templates, Azure portal, or REST APIs. This service orchestrates balanced, identical VMs. It’s fully managed and adjusts instance numbers as needed, boasting high availability. Valuable for large-scale operations in Computation, Big Data, and containers, VMSS automates scaling, reducing oversight. Azure VM Scale Sets are pivotal in creating consolidated Azure services, enhancing efficiency and scalability.

Types of Autoscaling rules:

Autoscale allows the users to dynamically assign or remove resources depending on the load present on the services. They can state the minimum and maximum number of instances to be executed and add/remove VMs by following a set of rules in the rage.

Here is the description of Autoscaling rules:

i. Metric based Autoscaling:

It fundamentally quantifies the application usage or load and then carries out autoscaling of VM instances. For example, it facilitates performing some action when CPU usage reaches higher than 70%.

ii. Time based Autoscaling:

It is a scheduled-based auto-scaling that is activated whenever an application observes a particular time pattern or it is scheduled at a specific interval. For example, you can set it to be activated at a specific event like at 10 AM.

Here are the steps to be performed in Auto-scaling:

Step-1: The first step is to choose time or metric. Based on this choice, it will turn out to be metric-based or schedule-based auto-scaling. You can define metrics like CPU utilization whereas you can define time like 6 AM.

If you want to decrease the number of servers then schedule-based auto-scaling is useful. But to perform auto-scaling according to load, metric-based auto-scaling is useful.

Step-2: The second step in the auto-scaling is to specify a rule with the condition. To understand better, for example, if the CPU utilization exceeds 70% then it is necessary to spin off a new instance. After the condition is fulfilled, some actions can be performed. These can be adding/removing VMs or delivering email to a system administrator, etc. It is vital to choose the type of autoscaling and define the actions and rules which must be followed when the condition in that specific rule is met.

Now let’s understand the types of Azure VM scale sets:

Types of Azure VM Scale Sets:

1. Horizontal Scaling:

It defines the process of adding/removing single or multiple VMs from a scale set based on the load present in the application. This scaling is used whenever users demand a specific VM for a certain time interval during which the load present on the application is higher and then discard the machines after the particular period is over. Here, rules to perform auto-scaling are mostly metric-based as adding or removing the machines depends on the application’s demand.

2. Vertical Scaling:

It is the process of adding the resources of machines like CPU power, RAM, disks space, etc., to a scale set as per the load of the application. Typically, resources are added to boost the capacity of the machines. To accomplish vertical scaling, it usually happens that the system needs to reboot or restart the specific machines in which resources are already added. The same can momentarily influence the overall performance of the VM scale set.

Vertical scaling is used when the user wants to boost the performance of the specific scale set owing to the degradation in CPU performance. So, CPU resources are appended to the specific VM scale set to boosts the size of machines.

Reasons to use virtual machine scale sets:

To offer enhanced performance and redundancy, applications are usually spanned across multiple instances. A load balancer helps customers to access your application. This component allocates requests to any one of the application instances.

Keep in mind that if you intend to carry out maintenance or update any application instance, your customers should be shared with another accessible application instance. Moreover, to fulfil the additional customer demand, you might have to boost the number of application instances that operate your application.

Azure VM scale sets offer management abilities to those applications that operate across several VMs, load balancing of traffic, and automatic scaling of resources.

i. Ease of creating and managing multiple VMs:

When there are several VMs that execute your application, it becomes vital to maintain a uniform configuration throughout your Azure environment. To make sure your application offers reliable performance, the parameters like disk configuration, VM size, and application installs must match throughout all the VMs.

With the implementation of VM scale sets, every VM instance are prepared from the same base OS image as well as configuration. This tactic assists you to deal with tons of VMs without making any additional configuration tasks or adopting any network management technique.

VM scale sets to support the usage of Azure load balancer for basic layer-4 traffic distribution. It also supports Azure Application Gateway for more advanced layer-7 traffic distribution as well as TLS termination.

ii. Offers application resiliency and high availability:

VM scale sets are extensively used to execute multiple instances of an application. In case any of such VM instances depict any problem, the customers would continue to access your application using any other VM instances.

To benefit from high availability, Availability Zones can be used to automatically share VM instances in a scale set in a single datacenter or throughout multiple datacenters.

iii. Automatically scaling of the application according to changes in resource demands:

All through the day or week, the customer demand for the application you designed may change. To fulfil their demand, VM scale sets can automatically elevate the number of VM instances according to the increase in demand of the application. Subsequently, it decreases the number of instances as demand declines.

Autoscale also reduces the number of superfluous VM instances which execute your application whenever demand is low. In this case, customers persist to obtain a satisfactory level of performance with the rise in demand, and also, the additional VM instances are added automatically. So, this feature helps in cost reduction and competently creates Azure resources as needed.

iv. Ease of scalability:

Scalability assures that resources can deal with the load, depending on the modification of work quantity. It also assures that resources are flexible to deal with the load.

v. Operates at large-scale:

VM scale sets allow a maximum of 1,000 VM instances for standard marketplace images as well as custom images via the Azure Compute Gallery. So, if you intend to develop a scale set with the help of a managed image, note that the limit would be 600 VM instances. You can use the Azure Managed Disks to obtain outstanding performance with production workloads.

vi. Ease of grouping multiple VMs:

It is possible to group multiple VMs beneath a single scale set. For instance, you may have two VMs with applications belonging to the travel domain. You can place both of them underneath a single scale set and then define an identical scale set for both.

Similarly, you can club VMs that share accounting domain applications into a different scale set. Consequently, it becomes simple to handle multiple VMs in form of a group to delineate and manage their scalability by maintaining a uniform configuration throughout your environment. At this point, you need to define scalability across scale sets instead of individual VMs in it. This way, it is possible to handle thousands of VMs.

--

--

Aammir Mirza
Aammir Mirza

Written by Aammir Mirza

Cloud Architect with 12 years of experience in managing cloud infrastructure and automation, integrating Azure cloud-based infra components

No responses yet