Understanding Containers
With the context of web apps fresh in your mind from Chapter 2, Implementing Azure App Service Web Apps, consider the scenario of a web application. Historically, if you wanted to run a web app, you would need to have a web server hosted on a physical or virtual machine (VM). VMs were often preferred, due to their smaller resource footprint, flexibility, and ability to have immutable infrastructure in the form of VM images.
You can host multiple VMs on a single server, providing the server has enough compute resources available. Consider this: the server has its own hardware; its own operating system, which has a kernel; and a hypervisor that brokers the communication between the host and any guest VMs. Each VM has its virtual hardware (hardware virtualization) and its own operating system with a kernel.
With all the benefits that VMs bring, for certain workloads, they are somewhat heavy in terms of the resource footprint. If all you’re using a...