Azure Course · Compute lesson
Azure Compute Services: VMs, App Service and Functions
Compare Azure VMs, App Service and Functions using operational ownership, triggers and a worked API choice.
Learn the concept, inspect a worked scenario, and test a fresh variation.
Core idea
The same HTTP endpoint can be hosted several ways; requirements decide.
App Service → web app
Functions → event code
The direct answer
Choose compute by workload and operating ownership.
Azure Virtual Machines, App Service and Functions can all run application logic. AZ-900 asks you to describe compute types and hosting options; the practical skill is identifying why a particular option fits a stated workload. Start with OS control, execution trigger, runtime, scaling and the operations your team will accept.
The Microsoft AZ-900 outline includes VMs, containers, Functions and application hosting. This lesson compares three common choices, while Microsoft’s compute selection guide covers a wider set of services. The course pricing block follows this introduction.
Course access
Choose your next step in Azure.
Review the current course options and access details here.
Heycademy Courses · Coming Soon
Master AZ-900 with Heycademy
We’re preparing an interactive learning experience with practical exercises, skill assessments and personalized learning to help you build confidence and master new skills.
We’re putting the finishing touches on this course. Please check back for updates.
Core distinction
Where does the team’s responsibility begin?
| Option | Best starting clue | Team operates | Question to verify |
|---|---|---|---|
| Azure VM | Needs guest OS or infrastructure control. | Guest OS, app, data and access. | Is OS control genuinely required? |
| App Service | Deploy a web app/API without guest OS upkeep. | App code, data, configuration and access. | Does the runtime and network design fit? |
| Azure Functions | Code reacts to HTTP, timers or other events. | Function code, data, configuration and access. | Which hosting plan, execution pattern and limits fit? |
A function may respond to HTTP requests, and App Service can run scheduled background work in some architectures. The labels are starting clues, not exclusive rules. The right implementation depends on service limits, hosting plans, runtime support, networking, resilience and cost.
A repeatable choice
Ask five questions in order.
- Is a custom guest OS component required? If yes, investigate a VM or another option that supports it.
- Is the work a long-lived web app, event reaction, batch job or container workload?
- What runtime, deployment and networking features are mandatory?
- Who will patch, monitor and scale the application and underlying platform?
- What does the expected traffic pattern mean for the chosen pricing model?
Do not decide solely from the word “API.” Both App Service and Functions can expose HTTP endpoints. An app can also be packaged as a container. AZ-900 rewards recognizing the broad categories and appropriate use cases; a production choice needs a fuller architecture review.
Worked case: Harbor API
Select a reasonable initial host.
Harbor has a customer-facing JSON API, a supported web runtime, regular traffic and no OS-specific dependency. The team wants CI deployment and to avoid guest OS patching. App Service is a reasonable first candidate. A VM would work but add OS maintenance without satisfying a stated need. Functions may also work technically, but the scenario gives no event-driven requirement that makes it the obvious first choice.
| Input | Observation | Decision effect |
|---|---|---|
| Regular HTTP API | Long-running application behavior. | Consider managed web hosting. |
| No OS dependency | Guest OS control not needed. | VM loses its strongest reason. |
| Own customer records | Data and access remain team duties. | Select identity and storage separately. |
| Traffic unknown | No capacity estimate yet. | Check plans and pricing before committing. |
Verification: if Harbor later requires a custom driver, revisit the VM option. If the work becomes “resize an image on upload,” an event-triggered Function deserves more weight.
Keep building this skill
Turn the example into a sound cloud decision.
Return to the course options whenever you are ready.
Contrasting case
An upload event is different from a web site.
In a document portal, a new Blob upload starts a short thumbnail task. Functions fits the event shape: code runs in response to a trigger. That does not automatically settle execution duration, storage, networking or budget. Check the actual Function hosting choices and limits for the workload. Keep the web portal itself on a separate appropriate host if needed.
A VM dedicated to waiting for occasional uploads can add unnecessary operation. But a Function is not a magic substitute for every long-running or specialized job. Use the decision method above, then compare current service documentation.
Try it yourself
When does the first choice change?
A legacy intranet app requires a Windows component installed in its guest OS. Its users are few, and the team can patch the OS. Which option is the strongest starting point among the three?
Show the answer
A VM is the strongest starting point because the OS dependency is decisive. It brings patching and maintenance duties. Confirm that the component truly requires VM control and that no managed option meets it.
Now remove the component and require only a standard web runtime. App Service becomes a more attractive managed starting point. Write what the team still owns: code, data, access, configuration and application monitoring.
Common errors
Avoid a label-only answer.
| Claim | What is missing | Better check |
|---|---|---|
| Functions is always cheaper. | Hosting plan and workload pattern. | Estimate actual executions and resources. |
| VM is more secure because I control it. | Patching and configuration burden. | Map shared responsibilities and controls. |
| HTTP means App Service only. | Functions can serve HTTP too. | Check lifecycle and requirements. |
| PaaS owns our data. | Customer data duty remains. | Map access and data controls. |
The networking and storage lesson adds surrounding services. For exam breadth, remember that the official guide also names containers, scale sets, Virtual Desktop and other hosting concepts.
Operational ownership after deployment
The hosting decision affects the work list.
| Task | VM | App Service | Functions |
|---|---|---|---|
| Guest OS patching | Customer manages. | Platform manages. | Platform manages. |
| Application code and dependencies | Customer. | Customer. | Customer. |
| Customer data and identity | Customer. | Customer. | Customer. |
| Scaling configuration | Customer designs and configures. | Customer selects and configures plan/scaling. | Customer selects hosting and scaling choices. |
| Monitoring application behavior | Customer. | Customer. | Customer. |
Moving from a VM to a managed service reduces some platform operations but does not remove application ownership. For Harbor’s API, a team with no OS requirement can spend time on API behavior, data access and performance rather than guest OS patching. The exact scaling and billing model varies by plan, so this table cannot substitute for a current service-specific design review.
If the team has a container image, include that as another candidate. Azure offers several container hosting choices. AZ-900’s objective is to compare compute types and application-hosting options, so do not reduce the entire domain to only VM, App Service and Functions. The lesson’s decision method extends: name the workload packaging, control need and operational boundary, then check current capabilities.
Cost and resilience crosscheck
A sensible host still needs a feasible plan.
For a website with steady traffic, collect expected request volume, peak concurrency, runtime, storage and network needs. Compare the current App Service plan or Function hosting option against those requirements. A service-model label does not reveal the actual monthly cost or resilience behavior. Use the Azure pricing calculator for an estimate and monitor real usage after deployment.
Make a two-row decision record: one row for normal daytime demand and another for a brief traffic spike. If the selected option handles the first but not the second, identify which scaling feature or architecture change is required. If the application also requires private data access, verify the hosting option’s network integration. This prevents an exam-level answer from being mistaken for a production approval.
FAQ
Questions about this skill.
Can Functions host an HTTP endpoint?
Yes. An HTTP trigger is possible; choose by the full workload rather than the protocol alone.
Does App Service remove responsibility for code security?
No. The team retains application and data responsibilities.
Are VMs always wrong for a small app?
No. A specific OS or infrastructure requirement can justify one.
Continue with the course
Build reliable Azure fundamentals skills.
Review the course options and choose your next learning step.