Intermediate · Microsoft Azure essentials · topic 25 of 50 · 30 min
Azure compute and storage
Explanation
Virtual machines
An Azure Virtual Machine is the same idea as an EC2 instance: you pick an image (Ubuntu, Windows Server), a size, a disk and a network, and you manage the operating system. Sizes are grouped into families by the job they do best.
| Family | Good for | Example size name |
|---|---|---|
| B (burstable) | Small apps that are mostly idle with short busy spells; builds up CPU credits | Standard_B2s |
| D (general purpose) | Balanced CPU and memory: web servers, small databases | Standard_D2s_v5 |
| E (memory optimised) | More memory per CPU: databases, caches, analytics | Standard_E4s_v5 |
| F (compute optimised) | More CPU per GB of memory: batch work, game servers | Standard_F4s_v2 |
Read a size name like Standard_D2s_v5 as: family D, 2 vCPUs, s means it can use premium SSD disks, v5 is the generation. There are also N (GPU), L (storage) and M (very large memory) families. Sizes and prices change often and differ by region, so check the current sizes page before you choose.
Staying up: availability sets and zones
An availability set spreads your VMs across fault domains (separate racks with their own power and network switch) and update domains (groups that Azure restarts one at a time during maintenance), all within one datacentre. Availability zones go further: VMs in different zones sit in different buildings with separate power and cooling. Zones protect against a whole datacentre failing; sets do not. For the exact uptime SLAs (for example two or more VMs across zones), check the current Azure SLA page.
A Virtual Machine Scale Set manages a group of similar VMs. It can add VMs when CPU is high and remove them at night (autoscale), and it can spread them across zones. It is the Azure match for an AWS Auto Scaling group.
App Service and Container Apps
Azure App Service is platform as a service (PaaS) for web apps and APIs in .NET, Java, Node.js, Python or PHP, or in a container. You push code and Azure handles the servers, patching and load balancing. The App Service plan sets the region, operating system, size and number of instances; several apps can share one plan. Higher tiers add features such as autoscale, deployment slots (a staging copy you swap into production) and private networking; check the docs for which tier has what.
az webapp up --name canteen-api-asha --resource-group rg-demo \
--location centralindia --runtime "PYTHON:3.12" --sku B1Azure Container Apps runs containers without you managing Kubernetes. It scales on HTTP traffic or queue length, can scale to zero, and keeps revisions so you can split traffic between versions. Containers are covered properly in a later module.
Storage accounts
A storage account is the container for Azure Storage data. Its name must be 3 to 24 lower-case letters and numbers and unique across all of Azure, because it becomes part of the address, such as https://stcanteen01.blob.core.windows.net. One general-purpose v2 account offers four services:
- Blob storage: objects such as images, videos, backups and logs (like Amazon S3).
- Azure Files: file shares over SMB or NFS that many machines can mount (like Amazon EFS or FSx).
- Queue storage: simple message queues between parts of an app.
- Table storage: a simple key and attribute NoSQL store.
| Redundancy | Copies kept | Survives |
|---|---|---|
| LRS (locally redundant) | 3 copies in one datacentre | A disk or server failure |
| ZRS (zone-redundant) | 3 copies across 3 availability zones in one region | A whole datacentre or zone going down |
| GRS (geo-redundant) | LRS in the primary region plus 3 copies in the paired region | A regional disaster (after failover) |
| GZRS (geo-zone-redundant) | ZRS in the primary region plus 3 copies in the paired region | Both a zone outage and a regional disaster |
Add RA- (read access), as in RA-GRS, if you want to read from the secondary region even before a failover.
Blob access tiers
Storage price and access price pull in opposite directions. Hot has the highest storage price and the lowest cost to read. Cool, Cold and Archive are cheaper to store but cost more to read, and they have a minimum retention period: if you delete or move a blob earlier, you pay an early deletion charge for the remaining days.
| Tier | Use it for | Minimum days | Read speed |
|---|---|---|---|
| Hot | Data used often: website images, active files | None | Milliseconds |
| Cool | Used now and then: last month's reports, short-term backups | 30 | Milliseconds |
| Cold | Rarely used but needed fast when asked | 90 | Milliseconds |
| Archive | Almost never used: compliance records kept for years | 180 | Hours: the blob must be rehydrated first |
Archive is offline. To read an archived blob you rehydrate it to Hot, Cool or Cold, which can take up to about 15 hours at standard priority (high priority is faster for small blobs). Check the access tiers page for current details and prices. Lifecycle management policies move blobs between tiers automatically, for example to Cool after 30 days and Archive after 180.
{
"rules": [
{
"enabled": true,
"name": "age-out-reports",
"type": "Lifecycle",
"definition": {
"filters": { "blobTypes": ["blockBlob"], "prefixMatch": ["reports/"] },
"actions": {
"baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 30 },
"tierToArchive": { "daysAfterModificationGreaterThan": 180 },
"delete": { "daysAfterModificationGreaterThan": 2555 }
}
}
}
}
]
}Sharing safely with SAS tokens
A shared access signature (SAS) is a signed URL that grants limited access, such as read-only on one blob for two hours. Prefer a user delegation SAS, which is signed with Entra ID credentials instead of the account key. Keep SAS lifetimes short, give only the permissions needed, and use HTTPS only.
az storage blob generate-sas --account-name stcanteen01 \
--container-name reports --name 2026-10.pdf \
--permissions r --expiry 2026-10-20T18:00Z \
--auth-mode login --as-user --https-only --full-uriNeed help?
Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.
Try:
Watch the lesson
Azure compute and storage · 1/7
This lesson covers Azure compute and storage: virtual machines, App Service, and storage accounts.
Prefer a video by a teacher? Find free videos on “azure storage account blob access tiers hot cool cold archive redundancy LRS ZRS GRS” on YouTube ↗
In real life: Lab reports at a diagnostics chain
A diagnostics lab chain in Kolkata stores every patient report PDF in Blob storage. New reports are downloaded often in the first weeks, so they start in Hot. A lifecycle policy moves them to Cool after 30 days, when patients rarely open them, and to Archive after a year, where they stay for the legally required period. The storage account uses GZRS, so a datacentre outage or even a regional disaster does not lose data. Patients get a link with a user delegation SAS valid for 24 hours, so nobody can guess or reuse permanent links. The web portal runs on App Service with a Standard plan that scales out on busy Monday mornings.
Practice (0/3 done)
Monthly sales reports are opened often for 3 weeks, then almost never, but must be readable within seconds for 2 years. Which plan is best?
Write choose_tier(reads_per_month, keep_days, need_instant) that returns the cheapest suitable blob tier using these simplified rules for this task, checked in this order: "Archive" if need_instant is False, keep_days >= 180 and reads_per_month <= 0.1; "Cold" if keep_days >= 90 and reads_per_month < 1; "Cool" if keep_days >= 30 and reads_per_month < 4; otherwise "Hot". (The day limits match the minimum retention periods, so you avoid early deletion charges.)
Choose compute and storage for a college results portal: about 50 visits a day for most of the year, and 50,000 visits in the hour results are published. Students download a PDF mark sheet. Old results must be kept for 10 years. Write your choices and why.
Quick quiz
Read more (free)
Related help
Before this, learn
This topic builds on these. If something here feels new, open them first.
Related topics
- Azure networking, Functions, databases and monitoringMicrosoft Azure essentials · same module
- AWS vs Azure vs Google Cloud: the service mapGoogle Cloud and comparing the clouds
- Core Google Cloud servicesGoogle Cloud and comparing the clouds
- Designing for high availabilityHigh availability, scaling and disaster recovery
- Block and file storage: EBS, instance store and EFSCompute and storage: EC2 and S3
- Choosing where to run a containerContainers in the cloud
Questions people ask about this
Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.
Which VM family is designed for small workloads that are idle most of the time with short CPU bursts?
Answer: B series
B-series VMs build up CPU credits while idle and spend them during bursts.
What protects VMs against a whole datacentre in a region going down?
Answer: Spreading them across availability zones
Zones are physically separate datacentres. An availability set only spreads VMs across racks in one datacentre.
Which redundancy keeps 3 copies across availability zones AND copies in a paired region?
Answer: GZRS
GZRS is ZRS in the primary region plus asynchronous copies in the secondary region.
You move a blob to Archive and delete it 60 days later. What happens?
Answer: You pay an early deletion charge for the remaining 120 days
Archive has a 180-day minimum. Deleting at day 60 is charged as if stored for the remaining 120 days.
What is a SAS token?
Answer: A signed URL giving limited, time-bound access to storage
A shared access signature grants specific permissions until an expiry time, without sharing the account key.
Which service is Azure's identity platform, used for sign-in and single sign-on?Related
Answer: Microsoft Entra ID
Microsoft Entra ID (formerly Azure Active Directory) is Azure's identity service.
Which Indian Azure region is in Pune?Related
Answer: Central India
Central India is in Pune, South India in Chennai and West India in Mumbai.
From How Azure is organised: tenants, subscriptions and resource groups
Which service runs your container, scales with traffic and can scale down to zero?Related
Answer: Cloud Run
Cloud Run is serverless containers with scale to zero.
What is an Availability Zone?Related
Answer: One or more data centres in a region with independent power, cooling and networking
AZs are isolated data centres inside one region, joined by low-latency links.
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.
Next steps
- 1 more topic in “Microsoft Azure essentials” before its exam: Azure networking, Functions, databases and monitoring.
- Module 6 exam: Microsoft Azure essentials · 13 questions · 20 min, without help. 4 topics of this module still to finish first.
- Then the next module, Google Cloud and comparing the clouds. 50 topics left in the course before the final exam.