Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Windows Server » Virtual Machine Scale Set: Demonstrating High Availability in Azure
  • fix Client Certificate Mapping Authentication error
    How to fix Client Certificate Mapping Authentication error Backup
  • Missing ADML File
    Fix an appropriate resource file could not be found for LAPS Windows
  • Data Migration Assistant Compatibility mode
    DMA Compatibility Mode: Prepare and Migrate Safely Network | Monitoring
  • Azure Backup Copy 1
    How to Delete Backup Job in Recovery Services Vault AWS/Azure/OpenShift
  • Machine does not support XSAve
    How to disable side-channel mitigations on VMware Workstation Virtualization
  • images 8
    Microsoft Direct Access: Now Always On VPN Windows Server
  • VMware Error Fix
    How to fix “The process cannot access the file because another process has locked a portion of the file” Virtualization
  • sonarlite
    How to Setup SonarLint in VS Code for Your App Project Configuration Management Tool

Virtual Machine Scale Set: Demonstrating High Availability in Azure

Posted on 30/10/202216/12/2023 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on Virtual Machine Scale Set: Demonstrating High Availability in Azure
HighA

High availability refers to a group of technologies that reduces IT outages by ensuring business continuity of IT services through redundant, fault-tolerant, or failover-protected components located inside the same data centre. This tutorial explores Azure’s high availability options for business. Please see how to Install PlayonLinux on a Linux System and How to install Redis on a Linux System also How to Install Apache Subversion on a Linux System

In our own case, we will try and achieve this using a Virtual Machine Scale set. Hence, you can deploy and manage a group of load-balanced VMs using Azure virtual machine scale settings. Thus, VM instances can automatically grow or shrink in response to demand or a predetermined schedule and as such ensure that your workload is highly available.

Requirements for Azure Virtual Machine Scale Set

  1. Azure Portal
  2. Command Line Interface
  3. Working Internet

Find other useful articles here: How to solve Could not get lock /var/lib/dpkg/lock Error in Ubuntu Linux and How to set up a third-party DNS server on a Linux Server and

Step1: Create a Resource Group

A resource group is a logical container where all your workload that you want to group together are housed in. So, for evert project, it will make sense to create one and we will create one for this as well.

We can either choose to do this using Azure portal or using the Cli. Thus, we will use both methods. We will label the one we create with cli as techdirectarchivergroup1 and the one we create from the console as techdirectarchivergroup2. So, here is the one created with Cli

az group create --name techdirectarchivergroup1 --location eastus
suceeded
succeeded

Thus. here is the one created from the console. Just search for resource group and fill in the information as in the screenshot below:

demonstrating high availability in azure-console
console

Step2: Create a Virtual Machine (VM) Scale Set

You can create a Virtual Machine Scale Set using either the portal or CLI

CLI Option

az vmss create \
  --resource-group techdirectarchivergroup1 \
  --name sampleScaleSet \
  --image UbuntuLTS \
  --upgrade-policy-mode automatic \
  --admin-username azureuser \
  --generate-ssh-keys
virtual machine scale set: demonstrating high availability in azure-vsucess

Portal Option

Notice that we can have the option of placing the Virtual Machine scale sets in availability zones to further protect our workload against datacenter failures, thus making them even more highly available.

virtual machine scale set: demonstrating high availability in azure-vmscalesetp
Scaleset created using Azure portal with the option for Availability Zones

Step3: Loadbalancing

The load balancer was created automatically when we created the scale set using the CLI method. But for the Azure portal method, you will have to enable the option and when you do, everything will be automatically assigned

Virtual machine scale set: Demonstrating high availability in azure-portaload
enable loadbalancing

Create Traffic rules to enable traffic to the application

az network lb rule create \
  --resource-group techdirectarchivergroup1 \
  --name myLoadBalancerRuleWeb \
  --lb-name sampleScaleSetLB \
  --backend-pool-name sampleScaleSetLBBEPool \
  --backend-port 80 \
  --frontend-ip-name loadBalancerFrontEnd \
  --frontend-port 80 \
  --protocol tcp
Virtual machine scale set: Demonstrating high availability in azure-loadbalancer1
succeeded

Step 4: Deploy a sample app for the Azure VM Scale set

We shall install a basic web application. Furthermore, we’ll use The Custom Script Extension below to install a basic NGINX web server as shown below:

az vmss extension set \
  --publisher Microsoft.Azure.Extensions \
  --version 2.0 \
  --name CustomScript \
  --resource-group  techdirectarchivergroup1 \
  --vmss-name sampleScaleSet \
  --settings '{"fileUris":["https://raw.githubusercontent.com/Azure-Samples/compute-automation-configurations/master/automate_nginx.sh"],"commandToExecute":"./automate_nginx.sh"}'
Virtual machine scale set: Demonstrating high availability in azure-saap
Sample app deployment succeeded

Step5: Test Scale set

Therefore, we shall access the sample web application in a web browser. However, the way to go about this is to use the public IP address of the load balancer and we can get it with the command below:

az network public-ip show \
  --resource-group techdirectarchivergroup1 \
  --name sampleScaleSetLBPublicIP \
  --query '[ipAddress]' \
  --output tsv
Virtual machine scale set: Demonstrating high availability in azure-public-ip
public ip

In a web browser, type in the load balancer’s public IP address. The following example demonstrates how the load balancer distributes traffic to one of your virtual machine instances:

sucesss
loadbalancing successful

Although staying in the cloud is good but not following best practices can make you get into trouble and as such, whenever you finish whatever you are doing, it is important to clean up. So, let’s delete the resource group with it’s content using the command:

az group delete --name techdirectarchivergroup1  --yes --no-wait
Virtual machine scale set: Demonstrating high availability in azure-delete
delete

Summary

We can use a Virtual Machine Scale set to ensure high availability for the Azure workload. To this end, the steps to configure this have been shown in this article.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift, Windows Server Tags:Azure

Post navigation

Previous Post: How to Install and Use Minikube on a Linux System
Next Post: How To Configure a Domain Password Policy

Related Posts

  • windows admin center banner 825x400 1
    Fix failed to create new Scheduled Task RemoteException Windows Server
  • Windows Server
    Migrate Roles and Features to Windows Server 2022 using WSMT Windows
  • fix frequent shutdown due to licensing issues   Windows
    Fix Windows Server frequent disconnects and shutdown Windows Server
  • Configure Data Deduplication on Windows Server
    Video on how to Configure Data Deduplication on Windows Server Windows Server
  • images
    How to fix you are not allowed to view this folder on SSRS: MBAM reports cannot be accessed because it could not load folder contents Windows Server
  • image 130
    How to fix the Security Database on the Server does not have a Computer Account for this Workstation Trust Relationship on Windows Server [Part 2] Scripts

More Related Articles

windows admin center banner 825x400 1 Fix failed to create new Scheduled Task RemoteException Windows Server
Windows Server Migrate Roles and Features to Windows Server 2022 using WSMT Windows
fix frequent shutdown due to licensing issues   Windows Fix Windows Server frequent disconnects and shutdown Windows Server
Configure Data Deduplication on Windows Server Video on how to Configure Data Deduplication on Windows Server Windows Server
images How to fix you are not allowed to view this folder on SSRS: MBAM reports cannot be accessed because it could not load folder contents Windows Server
image 130 How to fix the Security Database on the Server does not have a Computer Account for this Workstation Trust Relationship on Windows Server [Part 2] Scripts

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • fix Client Certificate Mapping Authentication error
    How to fix Client Certificate Mapping Authentication error Backup
  • Missing ADML File
    Fix an appropriate resource file could not be found for LAPS Windows
  • Data Migration Assistant Compatibility mode
    DMA Compatibility Mode: Prepare and Migrate Safely Network | Monitoring
  • Azure Backup Copy 1
    How to Delete Backup Job in Recovery Services Vault AWS/Azure/OpenShift
  • Machine does not support XSAve
    How to disable side-channel mitigations on VMware Workstation Virtualization
  • images 8
    Microsoft Direct Access: Now Always On VPN Windows Server
  • VMware Error Fix
    How to fix “The process cannot access the file because another process has locked a portion of the file” Virtualization
  • sonarlite
    How to Setup SonarLint in VS Code for Your App Project Configuration Management Tool

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.