Tag Archives: High Availability

Azure Virtual Machine Scale Sets – Part 01 – What is it and How to set it up?

There are many different solutions available to load balance applications. It can be based on separate hardware appliances, virtual appliances or system inbuilt method such as NLB (Network Load Balancer). However, there are few common challenges on these environments. 

If its third-party solution, additional cost involves for licenses, configuration and maintenance 

Applications or services not always use all of the allocated resources. It may depend on demand and time. Since its fixed number of instance, infrastructure resource will be wasted in non-peak time. if its cloud service, it going to waste money!

When the number of server instances increase, it makes it harder to manage systems. Too many manual tasks!

Azure virtual machine scale sets answers all above challenges. It can automatically increase and decreases number of vm instances running based on demand or schedule. No extra virtual appliances or licenses involves. It also allows to centrally manage, configure large number of instances. Following points are recognized as key benefits of Azure virtual machine scale sets.

It supports Azure load balancer (Layer-4) and Azure Application Gateway (Layer-7) traffic distribution.

It allows to maintain same VM configuration across the instance including VM size, Network, Disk, OS image, Application installs. 

Using Azure Availability Zones, if required we can configure to distribute VM instances in scale set to different datacenters. It adds additional availability. 

It can automatically increase and decrease number of vm instances running based on application demand. It saves money!

It can grow up to 1000 vm instances, if its own custom images, it supports up to 300 vm instances. 

It supports Azure Managed Disks and Premium Storage. 

Let’s see how we can setup Azure virtual machine scale set. In my demo I am going to use Azure PowerShell. 

1) Log in to Azure Portal as Global Administrator
2) Open Cloud shell (right hand corner)
3) Make sure you are using PowerShell Option
4) In my demo scale set configuration as following
New-AzureRmVmss `
  -ResourceGroupName "rebelResourceGroup" `
  -Location "canadacentral" `
  -VMScaleSetName "rebelScaleSet" `
  -VirtualNetworkName "rebelVnet" `
  -SubnetName "rebelSubnet" `
  -PublicIpAddressName "rebelPublicIPAddress" `
  -LoadBalancerName "rebelLoadBalancer" `
  -BackendPort "80" `
  -VmSize "Standard_DS3_v2" `
  -ImageName "Win2012Datacenter" `
  -InstanceCount "4" `
  -UpgradePolicy "Automatic"
In above,




This is the command use to create Azure Virtual Machine Scale Set


This define the resource group name and it is a new one.


This defines the resource region. In my demo its Canada Central


This defines the name for the Scale Set


This defines the virtual network name


This defines the subnet name. if you do not define subnet prefix, it will use default


This defines the name for public IP address. If not define allocation method using -AllocationMethod , it will use dynamic by default.


This defines the load balancer name


This creates relevant rules in loadbalancer and load balance the traffic. in my demo I am using TCP port 80.


This defines the VM size. if this is not defined, by default it uses Standard_DS2_v2


This defines the VM image details. If no valuves used it will use default value which is Windows Server 2016 Datacenter


This defines the initial number of instance running on the scale set


This defines upgrade policy for VM instances in scale set

Once this is run it will ask to define login details for instances. After completes, it will create the scale set.


This also can do using Portal. In order to use GUI, 

1) Log in to Azure Portal as Global Administrator

2) Go to All Services | Virtual Machine Scale Set


3) In new page, click on Add


4) Then it will open up the form, once fill in relevant info click on create 


5) We also can review the existing scale set properties using Virtual machine scale sets page. On page click on scale set name to view the properties. If we click on Instances, we can see the number of instances running


6) Scaling shows the number of instances used. If need it can also adjust in here. 


7) Size defines the size of the VM, again if need values can change in same page. 


8) Also, if we go to Azure Portal | Load Balancers, we can review settings for load balancer used in scale set.


9) In my demo I used TCP port 80 to load balance. Those info can find under Load Balancing rules


10) Relevant public ip info for scale set can be find under inbound NAT rules



This marks the end of this blog post. In next post we will look in to further configuration of scale set. If you have any questions feel free to contact me on rebeladm@live.com also follow me on twitter @rebeladm to get updates about new blog posts.

Azure DNS

Azure DNS is now fully supported in the Azure Portal. Even it’s remain on preview mode it’s not too soon to start your testing before introduce to the production environment.

In your local AD infrastructure, AD DNS service is taken care of all your DNS entries. It can be A records, mail server records (MX), CNAME records, service records etc. the same methodology apply for the public domain names as well. For example let’s assume there is public domain name called contoso.com. There is web server which host contos.com web site and its ip address is Also there is mail server running on So I need A record for the web site and MX record for mail service. But how public internet know these values? I need DNS server to serve DNS enquires from internet.

There is few way to do this. Domain registrar allow to use their own DNS servers to setup your DNS records. Some do this as free service and some provide it as paid service. Also if you need you can setup your own DNS server and point public domain names to it.

Before choosing one of the above options it’s important to consider,

1)    Availability of the DNS servers – what if Primary DNS server go down? How to handle such situation and keep the organization services up and running?
2)    Performance – How to handle the DNS queries and provide faster response time?
3)    Fast DNS Updates – Normally if you add new DNS record or update existing record it can take 4-48 hours to fully resolve through internet.  But this can make impact based on the organization requirements. 

Why Azure DNS?

With Azure DNS, you can host your DNS domains in Azure. Manage your DNS records using the same credentials and billing and support contract as your other Azure services. Seamlessly integrate Azure-based services with corresponding DNS updates, streamlining the end-to-end deployment process.

Azure DNS uses a global network of name servers to provide fast responses to DNS queries. Because we use Anycast networking, DNS queries automatically route to the closest name servers for the best possible performance.

The Microsoft global network of name servers has the scale and redundancy to ensure ultra-high availability for your domains. With Azure DNS, you can be sure that your DNS will always be available.

When you add a new DNS record, the Azure DNS name servers are updated in just a few seconds, so you don’t have to wait long before that DNS record can be used.

Source: https://azure.microsoft.com/en-gb/services/dns/

Now theory is over, let’s see it in action.

In my demo, I am going to use one of my domain therebeladmin.com and point it to Azure DNS. Then going to create A record to point it to my web server.

1)    Log in to Azure Portal as administrator (https://portal.azure.com)
2)    Go to New > type DNS. Then from the search result click on “DNS Zone


3)    Then it will open up the service description window. Click on “Create” to start


4)    Then in next window, provide the domain name as the name field, then you need to select the subscription. Also in page you can select which resource group it belongs to.  It gives opportunity to select the location this service should locate primarily. Once its completed click on “Create


5)    Once service is successfully commissioned it will appear in the portal home. Or else if you go to “All Resources” you will be able to find the DNS service just deployed. Click on it to start configurations.



6)    In the page it shows the detail of the configurations. To point therebeladmin.com to Azure DNS, I need to point name servers to it from my domain registrar end.


7)    My web server is running on so I need to create A record for that. To do that click on “Record Set” icon


8)    Now in new window i am creating A record to point the website. Once done changes click on OK to create the record.


9)    I am also creating CNAME record for WWW. So if someone type www.therebeladmin.com in the web browser it will resolve correctly. Also MX record too.


10)    Now I can see the new records I added in the web page.


Next step is to go to domain registrar and update name server records so it’s pointed to Azure DNS.


Using a public too I check the dns status and now I can see Azure DNS records are resolving correctly.



If you have any questions feel free to contact me on rebeladm@live.com