Bitzu

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.

Source: https://learn.microsoft.com/en-us/training/modules/describe-azure-compute-networking-services/5-containers

Practice questions

Single choice

Which Azure compute option runs code only when an event triggers it and frees the resources when the code finishes?

  1. Azure Virtual Machines
  2. Azure Functions
  3. Azure Kubernetes Service
  4. 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.

Select all that apply

Which statements correctly compare containers with virtual machines?

  1. You do not manage the operating system of a container
  2. Every container ships with its own full guest operating system
  3. Containers are designed to be created and stopped dynamically
  4. Virtual machines start faster than containers do
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More AZ-900 topics in this module