AZ-900 ยท Compute and application hosting
Containers, VMs and functions
Comparing virtual machines, containers (Azure Container Instances, Azure Kubernetes Service, Azure Container Apps) and Azure Functions by control, startup time, density and billing.
Key points
- Virtual machines: own OS you manage; most control, slowest to create, paid while running.
- Containers: lightweight, share the host, no OS to manage, start quickly, many per host.
- Azure Container Instances: simplest way to run a container.
- Azure Container Apps: adds load balancing and scaling.
- Azure Kubernetes Service: orchestrates fleets.
- Azure Functions: serverless, event-driven; on consumption you pay only for run time.
Practice questions
Which Azure compute option runs code only when an event triggers it and frees the resources when the code finishes?
- Azure Virtual Machines
- Azure Functions
- Azure Kubernetes Service
- Virtual Machine Scale Sets
Show answer
Answer: B. Azure Functions
Azure Functions is event-driven and serverless: a trigger wakes the function and resources are released afterwards. VMs and container services keep resources running so the app can respond.
Which statements correctly compare containers with virtual machines?
- You do not manage the operating system of a container
- Every container ships with its own full guest operating system
- Containers are designed to be created and stopped dynamically
- Virtual machines start faster than containers do
- Many containers can run on a single physical or virtual host
Show answer
Answer: A. You do not manage the operating system of a container, C. Containers are designed to be created and stopped dynamically, E. Many containers can run on a single physical or virtual host
You do not manage an operating system for a container, containers are built to be created, scaled out and stopped dynamically, and many of them can share one host. Each VM, not each container, runs its own full operating system, and VMs are the slower option to provision.
With Azure Functions you must keep the compute resources provisioned and running even when no events arrive, so you pay for idle time.
Show answer
Answer: False
False. An event wakes the function and the resources are deallocated when it finishes, so on the consumption model you pay only for the CPU time used while it runs. Always-on resources are typical of VMs and containers.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
