Part 2 of 6 · 1 min read
The packaging problem
A service needs the same runtime wherever it runs.
A service runs on a laptop and fails on the server because a library differs. Shipping a meal in a sealed lunchbox avoids that: the food, the cutlery and the napkin travel together. BM frames the same problem as how to host many services cheaply and in isolation, and how to produce a uniform thing that any machine can run.
BM walks a ladder. One service per physical host wastes hardware. Putting several services on one host saves money but they interfere with each other. Virtual machines (VMs) cut a host into several virtual hosts using a hypervisor, a layer that controls and divides the hardware. Each VM has its own operating system. BM notes that VMs are heavy: starting one can take many minutes, and running many on a developer's machine is a strain.
Virtual machine
A virtual machine is a full simulated computer, with its own operating system, run on a real one through a hypervisor.
Example: a server with 64 GB of memory runs eight VMs of 8 GB each, and each boots its own copy of Linux.
Check yourself: 1. What problem do the lunchbox and the container share? 2. What does a hypervisor do? 3. Why are VMs heavy?