Fly.io Made Crystal Clear · chapter 2: The Mental Model: Deploy to Served Request

The Machine lifecycle

2026-09-29

Created and Destroyed cost nothing in compute. Started is billed in full. Stopped and Suspended cost less, with the exact numbers in chapter 4.

Below: the paragraphs from the book that build this idea, then the diagram itself (Figure 2.2), and a recap. About a minute of reading.

Every noun in this chapter eventually resolves to a Machine, so it is worth knowing its shape precisely. A Machine moves through a small number of states. Created means the space is reserved and the image has been fetched and assembled into a root filesystem, which takes roughly 10 to 20 seconds. Started means the VM has booted and is operational, and because everything was already assembled during the Created step, this takes well under a second. Stopped means the VM has shut down, but its assembled components stay on the host, which is exactly why restarting a Stopped Machine is fast. A related state, Suspended, exists alongside Stopped as another low-power option; chapter 7 is where you learn precisely when to reach for one over the other. Finally, Destroyed means the resources are permanently cleared, and a new Machine built from the same image afterward has to go through the slower Created path again, from scratch.

Figure 2.2 draws that cycle, with a plain answer to the question that actually matters day to day: is this state costing you anything right now.

Figure 2.2: The Machine lifecycle. Created and Destroyed cost nothing in compute. Started is billed in full. Stopped and Suspended cost less, with the exact numbers in chapter 4.
Figure 2.2: The Machine lifecycle. Created and Destroyed cost nothing in compute. Started is billed in full. Stopped and Suspended cost less, with the exact numbers in chapter 4.

Recap

  • The idea: Created and Destroyed cost nothing in compute.
  • The picture: Figure 2.2, from chapter 2 ("The Mental Model: Deploy to Served Request") of Fly.io Made Crystal Clear.
  • Go deeper: the chapter builds this step by step, with recipes and sources at the end.

This diagram is one of many in Fly.io Made Crystal Clear.

Every chapter opens with the gist, draws the hard ideas, and ends with recipes and sources.

Get the book

All diagrams