Update Domains in Azure
Training. Renew your certification.
On this blog
Prerequisites
Update Domains
Real life scenario
On this blog
On this page we talk about update domains. Update domains are used in availability sets and allows you to manage update risks when Microsoft updates in the underlying Azure platform that relate to your virtual machines in the availability set. Don’t confuse update domains with the updates on the operating system that you manage yourself.
You manage OS updates yourself with other features.
Prerequisites
Update Domains are configured in availability sets. If you are not familiar with availability sets, read this article. In the same article you will also read about fault domains which is out of scope on this subject.
Update Domains explained
Imagine that Microsoft performs maintenance on the underlying Azure platform that requires a reboot on this underlying hardware. Usually you notice nothing during maintenance actions, but there is always a risk of hick-ups that could affect on your resources. If something goes wrong, you wish that your virtual machines not depend on the same hardware. You are in control of this risk by using a proper update domain configuration to minimize impact.
From the article in the link above: Update domains indicate groups of virtual machines and underlying physical hardware that can be rebooted at the same time. The order of update domains being rebooted may not proceed sequentially during planned maintenance, but only one update domain is rebooted at a time. A rebooted update domain is given 30 minutes to recover before maintenance is initiated on a different update domain.
Scenario A: Let’s have look how virtual machines are divided over update domains. In the example below we have 5 update domains (UD) and we have 5 virtual machines (VM).
| UD1 | UD2 | UD3 | UD4 | UD5 |
|---|---|---|---|---|
| VM1 | VM2 | VM3 | VM4 | VM5 |
-> This results in 1 virtual machine in every update domain. If something goes wrong during the an Azure platform upgrade: it could impact 1 virtual machine. All update domains have one virtual machine.
Scenario B: In the next scenario 3 virtual machines are added and the total is 8 virtual machines. New virtual machines are added to the next available update domain which results in the following scenario.
| UD1 | UD2 | UD3 | UD4 | UD5 |
|---|---|---|---|---|
| VM1 | VM2 | VM3 | VM4 | VM5 |
| VM6 | VM7 | VM8 | — | — |
-> This results in 2 virtual machines in some update domains. If something goes wrong during the an Azure platform upgrade: in he worst scenario it could impact 2 virtual machines. Update domains one, two and three have two virtual machines.
Real life scenario
Having 5 virtual machines in one availability set:
You don’t need 20 update domains, 5 update domains will be sufficient.
The risk is the same: 1 virtual machine could be unavailable.
Explanation in scenario A.
Changing demands: Three machines are added to the availability set and the total is 8. We still have 5 update domains.
The risk: 2 virtual machines could be unavailable.
Explanation in scenario B. Ideally you would have changed the update domains in the availability set to eight, but you can’t change this setting after creation.
The update domains setting in the availability set CAN’T be changed after creation.
You can solve this by creating a new availability set with new settings and move the virtual machines to the new availability set. Test and plan this scenario, because there are important things to keep in mind: Microsoft Learn: change availability set.
What is the risk having 50 virtual machines in one availability set?
You want the maximum number of update domains (which is 20 at the moment).
The risk: 3 virtual machines could be unavailable.
The table is wide, but find the scenario below:
| U1 | U2 | U3 | U4 | U5 | U6 | U7 | U8 | U9 | U10 | U11 | U12 | U13 | U14 | U15 | U16 | U17 | U18 | U19 | U20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
| 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |