Lesson 9 of 28 · see all lessons
Start here: cloud concepts (skill area 1, 25-30%)
- 1. Start here: the AZ-900 exam, the plan and what you already know
- 2. What cloud computing is: shared responsibility and cloud models
- 3. Paying for the cloud: the consumption-based model, pricing models and serverless
- 4. Why the cloud: availability, scalability, reliability, security and manageability
- 5. IaaS, PaaS and SaaS: cloud service types and when to use each
Azure architecture, compute and networking (skill area 2, 35-40%)
- 6. Azure global infrastructure: regions, region pairs, sovereign regions and availability zones
- 7. Organizing Azure: resources, resource groups, subscriptions and management groups
- 8. Azure virtual machines: VM options, scale sets, availability sets and Azure Virtual Desktop
- 9. Containers, Azure Functions and app hosting: choosing a compute type
- 10. Azure networking: virtual networks, subnets, peering and Azure DNS
- 11. Connecting to Azure: VPN Gateway, ExpressRoute, and public and private endpoints
Storage and migration (skill area 2)
Identity, access and security (skill area 2)
Management and governance (skill area 3, 30-35%)
- 19. Azure costs: cost factors, the pricing calculator, Cost Management and tags
- 20. Governance and compliance: Microsoft Purview, Azure Policy and resource locks
- 21. Managing Azure: the portal, Cloud Shell, Azure CLI, PowerShell and Azure Arc
- 22. Infrastructure as code: Azure Resource Manager and ARM templates
- 23. Monitoring Azure: Advisor, Service Health, Azure Monitor, Log Analytics, alerts and Application Insights
Final review and four mock exams
18 min
Containers, Azure Functions and app hosting: choosing a compute type
Compare virtual machines, containers and functions, and choose between App Service, containers and VMs to host an app.
By the end of this lesson you can
- Explain how a container differs from a virtual machine
- Choose between Azure Container Instances, Azure Container Apps and Azure Kubernetes Service
- Decide when Azure Functions fits a job, and what serverless means
- Pick App Service, containers or VMs to host an application
From earlier lessons · 1 of 2
Copperleaf Logistics moves an old reporting app to an Azure virtual machine. A security update for the VM's operating system comes out. Who must install it?
Pick one answer.
From earlier lessons · 2 of 2
Which need points most clearly to an Azure virtual machine?
Pick one answer.
Copperleaf Logistics has priced virtual machines for its route-planning web app. Then the lead developer asks a fair question: why patch Windows on a web server at all? Meanwhile, the operations team wants a tiny job. Each time a driver uploads a delivery photo, shrink it and email the customer. Keeping a server running all night for a few seconds of work feels like paying a driver to sit in an empty van.
Containers: lighter than a virtual machine
Exam depth: know it cold.
A container is a package that holds an app plus everything it needs to run, such as libraries and settings. It runs as an isolated process on a host computer.
A virtual machine (VM) carries a complete operating system (OS) of its own. Containers share the host's OS kernel, the core of the OS. So containers are smaller, use fewer resources and start in seconds. You don't manage an OS for each container.
You can run many containers on one physical or virtual host. They're built to be created, scaled out and stopped on demand. Docker is a popular container engine, and Azure supports it.
Three ways to run containers in Azure
Exam depth: know it cold.
Azure gives you three main container services. Know the first two well; for the third, recognize the word orchestration, which means managing the whole lifecycle of many containers.
| Service | What it is | Pick it when |
|---|---|---|
| Azure Container Instances (ACI). | The fastest, simplest way to run a container in Azure. It's PaaS: you upload containers and Azure runs them. | You want to run a container with no VMs or extra services to manage. |
| Azure Container Apps. | PaaS like ACI, plus built-in load balancing and scaling. | Demand changes and the containers must scale with it. |
| Azure Kubernetes Service (AKS). | A container orchestration service. | You run a fleet of containers and need to manage them together. |
Decision rule: "simplest" or "fastest" points to ACI, "scale with demand" to Container Apps, and "orchestrate" or "fleet" to AKS.
Containers suit a microservice architecture: you split an app into small, independent parts, such as a front end and a back end. Then you scale or update each part on its own.
Copperleaf's developers package a nightly report tool as a container. They want to run it in Azure in the simplest way, with no virtual machines or orchestration to manage. What should they use?
Pick one answer.
Azure Functions: code that wakes up for an event
Exam depth: know it cold.
Azure Functions is an event-driven, serverless compute service. Serverless means Azure runs your code and you never manage the VMs or containers underneath. Event-driven means something must happen to start the code: a web request, a timer, or a message from another Azure service.
When the event arrives, the function runs. When it finishes, Azure frees the resources. On a serverless plan, you pay only for the time your code runs. Functions scale out automatically, so they fit short jobs (seconds or less) and demand that rises and falls.
Functions are stateless by default: each run acts as if it just restarted and remembers nothing. When you need memory between runs, Durable Functions adds state by passing a context from run to run.
Each time a driver uploads a delivery photo, Copperleaf wants a small piece of code to shrink the image. Uploads arrive in bursts, and nothing should run or cost money between them. What should Copperleaf use?
Pick one answer.
VMs vs containers vs functions
Exam depth: know it cold.
| Virtual machines | Containers | Functions | |
|---|---|---|---|
| What you manage. | The OS and all software on it. | The app inside each container; no OS per container. | Only your code. |
| Control. | Most. | Medium. | Least. |
| Start time. | Slower: a full OS must boot. | Fast: typically seconds. | Starts when an event arrives. |
| Scaling. | Add more VMs. | Add or remove containers quickly. | Automatic, by demand. |
| Billing. | While the VM runs. | While the containers run. | Serverless plan: only while code runs. |
Decision rule: full control of the OS means a VM. A packaged app that must move or scale fast means a container. Code that should run only when something happens means Azure Functions.
Match
Match each need to the Azure service that fits it best
Pick an item on the left, then its match on the right.
Azure App Service: host a web app without managing servers
Exam depth: know it cold.
Azure App Service is an HTTP-based service for hosting web apps, REST APIs and mobile back ends without managing infrastructure. It's platform as a service (PaaS): Azure keeps the environment running, and you focus on the app.
- Runs on Windows or Linux.
- Supports .NET, .NET Core, Java, Node.js, Python and PHP, among others.
- Offers automatic scaling, built-in load balancing and high availability.
- Deploys automatically from GitHub, Azure DevOps or any Git repository.
Four app styles share the platform: web apps, API apps, WebJobs and mobile apps. WebJobs are programs or scripts that run in the background, on a schedule or a trigger. Mobile apps are back ends for iOS and Android apps.
For the statement, select Yes if it is true. Otherwise, select No. With Azure App Service, you must install operating system updates on the servers that host your web app.
Pick one answer.
Choosing where to host an app
Exam depth: know it cold.
Microsoft describes app hosting as a spectrum. VMs give you the most control: you configure the environment exactly as you want. Containers sit in the middle: you isolate and manage each part of the app separately. App Service needs the least operational effort for web-facing apps.
Decision rule: for a web app, an API or a mobile back end, start with App Service. Move left on the spectrum only when a requirement forces it, such as custom OS software (VM) or an app already packaged in containers.
Exam-style practice
An online gift shop runs a Java web app. It plans to move the app to Azure with the least administrative effort. The team doesn't want to manage operating systems. What should it use?
Pick one answer.
A freight broker's billing program needs a vendor's custom software installed and configured deep in the operating system. Which compute option should you choose?
Pick one answer.
A ticket-booking company splits its site into separate front-end, back-end and payment containers. It runs dozens of them and needs a service to manage their lifecycle as one fleet. What should it use?
Pick one answer.
For the statement, select Yes if it is true. Otherwise, select No. Azure Functions keep data from one run to the next by default.
Pick one answer.
Worth keeping
- Containers share the host OS, so they're lighter and faster to start than VMs, and you manage no OS per container.
- ACI is the simplest way to run a container; Container Apps adds scaling; AKS orchestrates a fleet.
- Azure Functions is event-driven and serverless: code runs on an event, and you pay only while it runs.
- Functions are stateless by default; Durable Functions adds state.
- App Service is PaaS for web apps, APIs and mobile back ends; pick a VM only when you need OS control.
On the job
A project manager at Copperleaf has to explain the plan to finance. The route-planning web app goes to App Service, so nobody patches web servers any more. The photo job goes to Azure Functions, so it costs money only while photos arrive. One old customs tool needs a vendor driver, so it stays on a VM.
That one sentence per workload is how cloud teams talk in planning meetings. When a colleague says "just put it on a VM", ask what the app needs from the OS. Often the answer is nothing, and a managed option saves work every month.
The app has a home. But how do the web app, the database and the depots talk to each other without shouting across the internet? Next lesson: virtual networks, subnets, peering and Azure DNS.
Leaderboard
Loading…
50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.
Embed this practice on your site
Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.
Report a copyright problem with this lesson
Sources for this lesson (8)
Each fact in the lesson is marked with the number of the page it comes from.
- [1]Microsoft Learn: Study guide for Exam AZ-900: Microsoft Azure Fundamentals
- [20]Microsoft Learn: Azure Functions hosting options
- [45]Microsoft Learn: Describe Azure virtual machines
- [49]Microsoft Learn: Describe Azure containers
- [50]Microsoft Learn: Describe Azure functions
- [51]Microsoft Learn: Describe application hosting options
- [52]Microsoft Learn: Containers vs. virtual machines
- [53]Microsoft Learn: Service Fabric and containers