Skill 2.2.1
Compare compute types, including containers, virtual machines, and functions
Key Concepts
A virtual machine virtualizes the hardware: each VM runs a complete operating system that the customer manages, which gives the most control and suits any software, at the cost of longer start times and more maintenance. A container virtualizes the operating system: it packages an application with its dependencies, shares the host's kernel, starts in seconds and runs the same way everywhere, which suits microservices and portable applications. Several containers can run on one host.
A function in Azure Functions is serverless code that runs in response to an event and is billed per execution, so it costs nothing while idle and scales automatically. Functions suit short, event-driven tasks; the customer manages only the code. The comparison is about control versus management: VMs give the most of both, containers sit in the middle and functions give the least.