Microsoft Azure Fundamentals Whitepaper
Microsoft Azure Fundamentals Whitepaper
Fundamentals
- Terminology,
Hierarchy, and
Resources
Find more:
getnerdio.com
Azure Terminology
The first step in building an MSP cloud practice with Microsoft Azure is deeply familiarizing yourself
with Microsoft Azure’s fundamentals: its terminology, elements, and hierarchy. Here we will list and
define the most critical Azure elements and discuss how they interrelate with each other.
In this section, we will focus exclusively on Azure Resource Manager (ARM), which is Microsoft’s
latest and more current implementation of Azure. Prior to ARM, Azure used a “Classic” model,
which had significantly different terminology associated with it and is not relevant to the MSP
community today.
Microsoft Azure is a diverse cloud platform that contains hundreds of products (also known as
SKUs). Azure to Cloud is like Apple to devices--each has many products within multiple categories.
Azure Categories
These products fall into many categories. For instance:
• Virtual Machines
• Storage
• Networking
• Azure SQL – Microsoft managed SQL service without a “server running SQL” that can be
used as the database back-end for a new or existing application
• Azure Files – Microsoft managed SMB (CIFS) file share service that behaves just like a
Windows file server but without a server to manage
• Data Services – things like machine learning, analytics, and cognitive services
• Office 365
• Dynamics 365
We will focus on IaaS, SaaS, and somewhat on PaaS -- as those are the most fundamental building
Inside an Azure tenant there are subscriptions. A single Azure tenant can contain multiple
subscriptions, but each subscription must be contained within a single tenant. A subscription
is the “billing container”. You obtain a subscription directly from Microsoft or through an Azure
reseller and you can create resources inside of that subscription. The monthly Azure invoice
will contain the consumption of every resource you run inside of a subscription. If you don’t
run any resources and therefore have no consumption–-your bill is $0.
NERDIO TIP:
It is possible to use a single Azure tenant for all your customers’ infrastructure. We will
discuss below the advantages of doing so for flexibility of compute reservations.
Subscriptions come in many flavors, but the easiest way to think about them is an
agreement between you and Microsoft that you will use any of the available Azure products
under the terms of your subscription and you agree to pay for them after you’ve used them.
A good comparison is electrical power service in your home. You open an account with
the electricity provider (subscription), agree on a rate for electricity and delivery, use the
electricity during a month, and then pay the bill once the power company tells you how much
you have used or consumed.
Subscriptions obtained directly from Microsoft will typically be Pay-as-you-go, Free, EA, CSP, or
Sponsored.
• Free – this is limited subscription that you can obtain directly from azure.com to play
around with Azure for a limited time and to consume up to $200 in resources usage. This
type of subscription is too limited to use for anything but a simple VM or two and is not
recommended for MSPs looking to build cloud practices in Azure.
• EA (Enterprise Agreement) – if your customer is a larger organization, they will likely have
a direct volume licensing agreement with Microsoft that gets negotiated every few years
with annual “True Ups”. As part of this EA, the customer will have prepaid for a certain
amount of Azure consumption (monetary commitment) and will be able to use resources
in the subscription up to this amount. Any overages will be reconciled at the time of the
customer’s True Up with Microsoft.
• CSP – if you are a Direct CSP with Microsoft, you can provision a CSP subscription for Azure
inside of your customer’s tenant or your own tenant. Microsoft will bill you for the usage (i.e.
consumption) inside of this subscription – at your discounted reseller rate - and you will in
turn bill your customer. This is one of the most flexible and powerful types of subscription.
• Sponsored – if you are part of the Microsoft Partner Network (MPN) and have Silver or
Gold competencies, Microsoft may provide you with a sponsored Azure subscription that
you can use to hone your Azure skills, do demos for customers, and use internally. Each
subscription will have a preset monetary limit and you’ll be required to add a credit card
to be used once you exceed the preset limits. The details on your sponsored subscriptions,
if you have any, can be obtained in your Partner Center under MPN or your Partner
Development Manager (PDM). A word of caution: do not use sponsored subscriptions for
customer workloads. Once you exceed your sponsored subscription limit, you will be billed
at list rates on your credit card and there is no easy way to convert this subscription to CSP.
You will be forced to migrate actual resources to another subscription, which is a disruptive
process.
Most MSPs, however, purchase Azure through a CSP Provider (like Pax8, Sherweb, Ingram, Techdata,
etc.). The MSP in this scenario is known as a “CSP Reseller”. Using the CSP Provider’s own portal, the
MSP will be able to create a subscription to consume resources inside this subscription. The CSP
Provider will get a bill from Microsoft for the consumption and will in turn bill the MSP. The MSP will
then bill its customer for the Azure consumption.
Carefully consider your subscription options before starting to deploy Azure resources, as changing
subscription types later can be challenging or even impossible.
NERDIO TIP:
Become a CSP Reseller with your provider of choice and create a dedicated subscription for
each of your customers under a single tenant. This will provide you the optimal segregation of
billing information on a per-customer basis but will allow you to take advantage of portability
of Azure reservations between customers, since all subscriptions will be in the same account.
Resource groups are not billing units. You won’t be able to easily answer the question of “how much
are the resources in resource group RG-A costing me” by looking at your Azure invoice. These RGs are
there for ease of management, resource organization, and isolation. There are lots of resources in
every Azure deployment so keeping things nice, tidy, and logical is very important.
There could be multiple resource groups within a single subscription, but any one resource group can
only be part of only one subscription. Resource group names do not have to be globally unique, but
must be unique within a single subscription.
Finally, resources are created inside of a resource group, which is inside a subscription, which is inside
a tenant. What are resources? It’s everything that does something in Azure. Examples are virtual
machines, virtual networks, disks, network cards, VPN gateways, IP addresses, etc.
Some resources will be billable while others won’t. For example, a virtual machine (compute
resource) will be billable while a virtual network interface (network resource) attached to a virtual
machine will not be billable.
Billing in Azure typically has a unit and frequency. The easiest way to think about this is to go back
to our electricity at home example. Electric power is a resource, the unit is kWatt and frequency is
hour. We therefore have a pre-defined cost per kWatt-hour. As we use electricity, there is a meter
running that measures how many kWatt-hours we’ve used up and then the electric company sends
us a bill for what we used. Azure works the same way. For instance, a virtual machine (VM) is billed for
compute capacity (unit) on a per-second basis (frequency). Every time we start up (provision) a VM,
a meter starts up and keeps track of how long this VM is running. At the end of the month our invoice
will show how many hours we used a particular type of VM and that’s what we owe either Microsoft
directly or via a CSP.
The key takeaway here is that each billable resource has a virtual “meter” that’s running any time the
resource in “used” (this is defined differently for each type of resource). If we stop the resource, we
stop the meter and we are no longer billed.
• Subscription A
• Resource Group 1
• Subscription B
• Resource Group 1
Azure Resources
As we stated above, the building blocks of an Azure IT environment are Resources. These resources
are organized into Resource Groups inside of an Azure subscription. There are billable and non-
billable resources. Billable resources have a Meter attached to them that runs while the resource is
provisioned.
In this section, we will explore the three most common types of Azure resources used by MSPs when
deploying IT environments: Compute (virtual machines), Storage, and Network.
Every resource used in Azure must be deployed in a geographical location known as a Region. An
Azure region is a grouping of data centers located in a specific geographic location. Microsoft is
constantly growing its global footprint and adding data centers and regions. At the time of this
article, there are 54 regions available in 140 countries and the list is growing. The most up-to-date
map of regions can be viewed here.
Resources deployed in the same region are interconnected with high speed connectivity (think LAN
speeds). Resources in different regions can still communicate with each other but are subject to
additional WAN latency. The latency depends on how far the regions are from each other.
Ds-series
These are “general purpose” VMs that can be used for a wide variety of workloads. There are three
versions of the DS-series: v1, v2, and v3. Only v2 and v3 should be used.
• Purpose: general applications (domain controllers, file servers, application servers, etc.)
• CPU-to-RAM ratio
• V2 - $85/month
• V3 - $77/month
• V2 VMs use non-hyperthreaded vCPUs (1 vCPU per 1 physical CPU core), which is why
they are slightly more expensive. V2 VMs start at a single core size (DS1v2).
• V3 VMs use hyperthreaded vCPUs (2 vCPUs per 1 physical CPU), which is why they are
less expensive. V3 VMs start at a minimum of two vCPUs (D2sv3).
Ds-series VMs are a good fit for workloads that require consistent CPU usage and are not very RAM
hungry.
• Purpose: general, RAM bound applications (database servers, application servers, desktops, etc.)
Esv3-series VMs are very similar to Dsv3-series but have double the RAM per CPU and are about 15%
more expensive. They are ideal for workloads that consistently utilize the CPU and are memory hungry.
Examples are database servers and RDS session hosts.
B-series
These are known as “burstable” VMs. They are very useful but the way they work is a bit complicated.
B-series are used for non-CPU intensive workloads (e.g. domain controllers, file servers) and cost about
50% of an equivalently sized Ds-series VM. The reason they’re cheaper is because Azure imposes a
quota on how much of the total CPU cores can be used. This quota is usually a fraction of the total
available CPU.
For instance, B2m’s quota is 60% of a single CPU, which is 30% of the 2 CPUs visible in the VM. Every
second that the VM is using less than its quota (less than 60% of a single CPU) it is “banking credits”.
These banked credits can be used to burst up to the total available CPUs (100% of 2 CPUs, in this
example) when needed. While bursting, the VM is consuming its banked credits. Once credits run out,
the VM’s CPU utilization is throttled down to its 60% quota.
Why use B-series VMs? They are cheaper. For approximately the same price that you would pay for a
Ds-series VM, you can get a B-series with double the CPUs and double the RAM. However, they should
only be used for workloads that are either not CPU intensive or “bursty”, meaning they only occasionally
need all the CPU but most of the time the CPU is idle.
For instance, an Active Directory domain controller is not utilizing its CPU very heavily on a regular basis.
However, when Windows Updates run, the VM will use all its available CPU horsepower. B-series are
perfect for Domain Controllers since they bank credits while idle and then consume them when needed
to update or do some other CPU intensive task.
• vCPU-to-RAM ratio: varies from 1:1 to 1:4 for VMs larger than B2s
• Approximate average list price per CPU: ranges from $13/month to $40/month
NERDIO TIPS:
• Don’t use B-series VMs for CPU intensive workloads
• When a B-series VM is first provisioned, it doesn’t have any banked credits and is subject to
its quota limit on the CPU, which means it’s slow. Once the VM is running idle for some time,
credits get banked and the VM performance improves when it needs to burst.
• Don’t shut down B-series VMs overnight when they are not in use. This will not allow the
VMs to bank credits for the following day of usage.
NV-series
These VMs are intended for special use-cases when a dedicated GPU is needed. They include an NVIDIA
GRID 2.0 Tesla GPU and are ideal for running graphically intensive workloads like AutoCAD, SolidWorks,
and Revit. These are very large and expensive VMs (starting at 6 CPUs and 56GB of RAM) and need to
be used with caution and with a specific purpose in mind to not generate unpredictably large Azure
compute consumption bills.
• New NVv2 VMs are currently in preview and are going to have the following notable
improvement once they are generally available. They will confer:
Anatomy of a VM
Now that we understand the different types of VMs, let’s talk about how to use them. The first
important thing to understand is that VMs are not stand-alone resources. For example, a VM must
have an OS disk (and optionally data disks) attached to it, as well as a virtual network interface (vNIC).
A new VM can be created (deployed) using an existing OS disk and vNIC or new disk and vNIC can be
created together with the VM. If a VM is deleted, its data (i.e. OS and Data disks) are not deleted. They
remain as resource objects in Azure that are not attached to any VM. More on Storage resources
later.
When deploying a VM, its OS disk must be based on an existing image and cannot be blank. Since
you don’t have console access to VMs in Azure, the OS cannot be installed on a “blank” OS disk. The OS
disk must already have the OS on it. Images could be pulled from the Azure image library or you can
create and upload your own custom image as a VHD file to Azure to be used for deploying a VM.
All VMs also come with a temporary D: drive that has locally attached fast storage (SSD). Keep in
mind that this disk is temporary, and any data stored on it will likely be erased if the VM is ever shut
down or moved to another Azure host in the background.
NERDIO TIP:
Use this disk for the pagefile and temporary data, but be sure to never store anything you need
to retain on the temporary disk.
The number of CPU cores that can be provisioned in a subscription in total and per VM family are limited.
For instance, a Free subscription has an overall core quota of 4. Direct Pay-As-You-Go subscriptions
have a default core quota of 10 and CSP subscriptions have a core quota of 20. This means that with a
CSP subscription you cannot provision more VMs whose total CPU cores exceed 20. Be mindful of this
limit. To increase the core quota limit, you need to submit a request to Microsoft via the Azure portal for
a core limit increase.
Presence of an SLA and the availability guarantee (e.g. 99.9% vs. 99.95% vs. 99.99%) is based on several
factors that have to do with the type of storage the VM uses for its OS and data disks, as well as if it
is deployed in an availability set or an availability zone. You can learn more about the specifics here.
The diagram below summarizes the available protection options.
For most situations relevant to an MSP, it is important to know that individual VMs (“Single VM” in
Microsoft terms) that use any Standard storage disks are not covered by any SLA. The chance of
outage is very small and even if the VM reboots due to an underlying hardware failure it will restart
very quickly elsewhere. However, it is important to remember that no SLA applies.
Critical VMs should use Premium storage only, which will provide them with a 99.9% availability
guarantee and improved performance. For additional availability guarantees, distributed workloads
that can have multiple VMs participating in the same application, can be placed inside Availability
Sets and will then be subject to 99.95% availability guarantee.
An example of such a deployment may be Active Directory. You can have two AD domain controllers
in an Availability Set and your AD, as a whole, will have a guarantee of 99.95%. This doesn’t mean
that each domain controller VM has this guarantee. Rather, the “application” (i.e. AD), as a whole, is
guaranteed to be available 99.95% of the time.
We will focus on three storage resources that are most commonly used by MSPs when deploying IT
environments in Azure: Managed Disks, Backup Vaults, and Files.
In addition to considering the type of storage resource, we need to understand the Data
Redundancy, Performance, and Cost for each type of storage object.
Data Redundancy
• Six total redundant copies of data; three copies stored in one region and another three
copies are asynchronously replicated to a second region
• Three redundant copies of data stored across two or three data centers within the same
Azure region
• RA-GRS – Read Access GRS. This redundancy type is not relevant to the storage objects in this
discussion
Performance Tiers
Standard storage utilizes inexpensive and slow HDD and recently Microsoft added Standard SSD, which
doesn’t increase the average performance but makes it more consistent than HDD.
Premium storage uses SSD disks and is fast. This type of storage is best for most disk IO intensive
applications such as databases and virtual desktops.
Ultra SSD is a new type of storage for very high-performance, disk IO intensive applications.
Now that we understand the redundancy and performance characteristics of Azure storage, let’s dive
into the actual storage resources.
Managed Disks are by far the most commonly used type of storage when deploying an IT environment
in Azure using virtual machines. Recall that each VM must have, at a minimum, an OS disk and
sometimes one or more additional data disks. These disks that get attached to a VM are known as
Managed Disks in Azure. There is an older type of disk called Unmanaged Disk, but for the purposes of
our discussion we will stick to Managed Disks.
If you’re interested in learning more about the differences between managed and unmanaged disks,
click here.
Managed disks are only available with LRS data redundancy since they are attached directly to VMs,
and these VMs must be able to communicate with disks in a very high throughput, low latency way.
This is why managed disks and the VMs they’re attached to must be in the same region. Disks come in
Standard HDD, Standard SSD, Premium SSD, and Ultra SSD performance flavors.
• Available sizes: 32GB – 32TB in discreet increments (e.g. 32GB, 64GB, 128GB, etc.)
• Billed on allocated space, not used space. Creating an S-type disk of a certain size will
result in a bill for the entire size, even if it completely unused.
• When to use?
• Available sizes: 32GB – 32TB in discreet increments (e.g. 32GB, 64GB, 128GB, etc.)
• Billed on allocated space, not used space. Creating an E-type disk of a certain size will
result in a bill for the entire size, even if it completely unused.
• When to use?
• Best for most non-disk IO heavy applications because of nice balance between
performance consistency and cost (e.g. domain controllers, file servers). Not a good
fit for high IO database servers.
• Available sizes: 32GB – 32TB in discreet increments (e.g. 32GB, 64GB, 128GB, etc.)
• Billed on allocated space, not used space. Creating a P-type disk of a certain size will
result in a bill for the entire size, even if it completely unused.
• Best disk performance for any disk IO intensive applications such as databases
• Great for power user virtual desktops and RDS session hosts with many users
• Expensive for data storage only when the VM is powered off. Consider converting P to
S or E disk if VM is being deallocated and data stored for archival purposes.
• Ultra SSD
• High performance and high cost disk option for very disk IO intensive workloads
Backup Vaults, as the name implies, are used by the Azure Backup service to store backup snapshots. It
is a Block Blob storage container and its cost is based on actual consumption. Currently, Azure backup
supports only Standard HDD performance tiers and LRS and GRS data redundancy options. The cost of
backup vault storage is approximately $0.024/GB/month for LRS and 2X that amount for GRS storage.
Azure Backup is most commonly used by MSPs to protect data on VMs running inside of an Azure IT
environment but can also be used to back up data from on-premises systems. To protect Azure VMs,
the backup vault must reside in the same region as the VMs that are being backed up to it.
Azure backup can be used to achieve compliance with requirements to save data in multiple
geographic locations by selecting the GRS redundancy option when creating the backup vault. This
way, there will be multiple copies of the backup data in the same datacenter where the VMs reside as
well as multiple copies in another paired region. With GRS, Microsoft has pre-defined region pairs. More
information is available here.
Azure Files
Azure Files is a PaaS offering. The easiest way to think about it is as a Microsoft-managed file server
where you can create Windows shares and publish them out to the world. These shares can then be
mounted directly on Windows, Linux, and macOS devices, either on-premises or in cloud VMs without
any special drivers.
Azure Files supports LRS, ZRS and GRS storage and costs range from $0.06/GB/month to $0.10/GB/month
plus the cost of operations ($0.015 to $0.03 per 10,000 transactions). Azure Files is currently available with
Standard storage only, which significantly limits its performance. However, Premium storage support is
in preview and should be available soon.
In summary, Azure offers an almost endless list of storage options with varying redundancy,
performance, and cost characteristics. For MSPs, it is important to focus on the storage types that are
commonly used for typical IT workloads (managed disks for VMs, Block Blob for Azure Backup and Azure
Files for creating SMB shares) and avoid confusion around other storage types that are designed for
developers creating applications and repositories.
We will focus on 4 network resources that are most relevant to an MSP and the way they interrelate
with each other: Virtual Networks, Public IP Addresses, Network Security Groups, and VPN
Gateways.
Before delving into the specifics of these network resources, we need to understand how Azure
charges for data transfer (aka bandwidth). The basic rule is that any data coming into an Azure data
center is free while going out of an Azure region will be charged on a per GB basis. It doesn’t matter
if the data is leaving a region and going into another region or leaving a region and going into some
other, non-Azure location. In both cases, there is a charge. However, data transfer within the same
Azure region (even across different data centers) is free.
How much does outbound data transfer cost? The first 5GB in any given month are free and then it’s
$0.05 to $0.087 per GB after that. Let’s put things in perspective; a 10GB file being downloaded from an
Azure hosted VM to your laptop will cost $0.87.
It is important to note that Azure data transfer is not charged per mbps (using 95% percentile or some
other method), but rather per transferred GB of data. Let’s compare the two methods.
Colocation Provider A charges $50/month for 1mbps of bandwidth using the 95% percentile method.
Assuming the line is utilized 95% for the entire month straight, that’s equivalent to 60sec/min*60min/
hr*24hr/day*30.5days/month * (0.95 * 1mbps) = 2,503,440 megabits per month, or 305GB/month. For the
same amount of data transfer, Azure cost will be $26.48.
Therefore, a useful number for cost comparison between “GB transferred” and “mbps” based pricing
is $26 per fully utilized mbps line. Since in a typical hosted IT environment the line is utilized only
fractionally the cost of bandwidth in Azure is relatively low compared to the way other hosting and
colocation providers charge for bandwidth.
With the cost of data transfer out of the way, let’s delve into the way networking is structured in Azure.
At the top level there is a Virtual Network (vNet). A vNet has an address space that you as an MSP can
define (e.g. 10.1.0.0/16). All objects within a vNet must fall inside of this address space. vNet also contains
Subnets. These subnets are a way to segment the vNet into smaller sections. For instance, you could
have a LAN and DMZ subnets within a vNet.
• vNet – 10.1.0.0/16
Subnets that are part of a vNet can have virtual Network Interfaces (vNIC) attached to them. These
vNICs are then attached to a VM and this is the way VMs communicate with each other and the rest of
the world.
VM->vNIC->Subnet->vNet.
Each vNIC has an assigned private IP address (or addresses), DNS settings, an optional public IP address
and other network interface properties. In Azure, IP address and DNS settings are not set at the Windows
level inside of a VM. Rather, they are set at the vNIC level in Azure. In Windows, the network adapter is
set to DHCP and receives its settings from the vNIC that’s attached to it. The vNIC itself could have a
statically assigned IP address or a dynamic one given to it by Azure via DHCP.
You can Peer (i.e., connect) different vNets together. These vNets can be in the same Azure region or you
can use Global vNet Peering to connect vNets in different regions.
Public IP addresses are billable Azure resources that can be assigned to a vNIC. There are dynamic
IP addresses and static IP addresses. Dynamic ones have a persistent DNS name that resolves to
a dynamic IP, while a static IP address has a fixed IPv4 address and DNS name. The cost of a public
dynamic IP address is $3/month while the cost of a public static IP address is about $4/month. Assigning
a public IP address to a vNIC does not automatically expose the VM to the internet. In order to make it
accessible from the internet a Network Security Group rule must be applied.
Network Security Groups (NSGs) are Azure’s basic network firewall. They are non-billable network
resources. NSGs are groups of firewall rules that specify what’s allowed or denied into and out of a
vNet. If an NSG is assigned to a subnet its rules will apply to all VMs whose vNICs are part of this subnet.
Alternatively, NSGs can be assigned directly to a vNIC. In that case, the NSG firewall rules will apply to
this single VM only.
Email: [email protected]
Website: getnerdio.com