This is Part 9 of Azure tutorial. In this video, we'll discuss the difference between availability
set and availability zone in azure. Availability set is a concept within a data-center. The servers
in a datacenter are divided into multiple physical and logical groups. The physical grouping is
called fault domain and the logical grouping is called update domain. You can think of,
each rack of servers with its own power supply and network switch as one fault domain. So, if there
are 10 racks of servers in a data-center. it's like you have 10 different fault domains. Now, you
may be thinking, why is such a grouping required? Well, to eliminate single point of failure.
For example, let's say, in a data-center we have 100 servers and all these servers are connected by
a single power supply and network switch. What if that single power supply or networks which fails?
Well, all the 100 servers will fail as well. So, to eliminate such a single point of failure,
each rack of servers has its own power supply and network switch. Now, let's say,
in each rack we have 10 servers. When the power supply or network switch in that track fails, only
the 10 servers in that rack are affected. The rest of the 9 racks, that is the other 90 servers
are unaffected. So, by grouping servers in a data center into multiple racks, that is multiple fault
domains, we are able to eliminate a single point of failure. Same idea with update domains as well.
If there are 100 servers in the data center, they are logically grouped into 10, 15 or 20 update
domains. So, the important point here to keep in mind is, an update domain is a logical grouping.
why are update domains required? Well, from time to time, server patches and software updates need
to be applied. Some updates require servers to be rebooted. Now, we don't want all the servers
to be rebooted at the same time, only one update domain is rebooted at a time. A rebooted update
domain is then given another 30 minutes to recover before maintenance is initiated on
a different update domain. So, in short an update domain is a group of servers that can be updated
and rebooted at the same time. An availability set is a concept within a data center and it is made
up of multiple fault domains and update domains. In fact when you create an availability set,
you can specify how many fault domains and update domains you want in that availability
set. We discussed this in detail, in our previous video. Availability zones also have the concept of
fault domains and update domains. First, let's understand, what is an availability zone? Well,
an availability zone is a unique physical location within an azure region. Each availability zone
is made up of one or more data centers with independent power, cooling and networking.
Not all regions have availability zones, but regions that do have availability zones have a
minimum of three separate zones. You can think of each availability zone as a separate fault
domain and update domain. So, in a given azure region, if you have three availability zones,
then it's like you have three fault domains and three update domains. So, for example,
if you create three virtual machines across three availability zones in an azure region,
your VMs are effectively distributed across three fault domains and three update domains.
If one of the availability zones has gone down for some reason, we still have two VMs from the
rest of the two availability zones. Similarly, if there is an update or a patch to be applied, azure
schedules these at different times for different availability zones. So, this means, we have just
one of the availability zones affected while the update is being applied. The rest of the two zones
are unaffected. Now, here's the important bit to keep in mind. The concept of update domain
and fault domain is present in both availability set and availability zone. In case of an
availability set, a group of servers - physical or logical, physical grouping i.e a rack of servers
is a fault domain and logical group of servers is an update domain. In case of an availability zone,
each availability zone itself is considered a separate fault domain and update domain. So, in a
given azure region, if you have three availability zones then it's like you have three fault domains
and three update domains. Now, if you just search the internet with the search string
"azure virtual machine sla", you'll land on the following page. I'll have the link to this page
available in the description of this video. Now, here is what it states. Microsoft guarantees only
99.9 % SLA, that is connectivity, if you create just a single instance of virtual machine in
azure. If you create two or more virtual machines in an availability set, then Microsoft guarantees
you will have connectivity to at least one of the virtual machines at least 99.95% of the time.
On the other hand, if you create two or more virtual machines across two or more availability
zones, then Mcrosoft guarantees you will have connectivity to at least one of the virtual
machines at least 99.99% of the time. So, in short, the following are the two main differences
between an availability set and availability zone. An availability set protects your azure resources
from failures within data centers, whereas an availability zone protects from entire data
center failures. From the service level agreement standpoint, that is uptime and connectivity,
with availability set azure offers 99.95& SLA whereas with availability zone we have 99.99%
SLA. So, there we go, with availability zones azure offers industry's best 99.99%
virtual machine uptime SLA. That's it in this video. Thank you for listening.