Ankit Patel
WritingPapersLabsAboutContact
Paper Reviews··2 min read·257 views

Firecracker's Useful Limits

AWS Firecracker · Agache et al., NSDI 2020

Firecracker keeps a separate Linux guest kernel per workload while stripping the virtual machine monitor down to the bare minimum.

Standard Linux containers isolate multi-tenant code inside one shared host kernel. A Firecracker microVM places each workload behind hardware virtualization via Linux KVM and a purpose-built Rust VMM exposing only virtio network and block I/O alongside a serial console and a one-button shutdown controller.

A Linux container shares the host kernel, while a Firecracker microVM adds a guest kernel and minimal VMM above KVM.
A Linux container shares the host kernel, while a Firecracker microVM adds a guest kernel and minimal VMM above KVM.

In the NSDI 2020 paper, Agache and colleagues frame what Firecracker leaves out as core to its security and density targets for AWS Lambda and Fargate. Serverless functions and short-lived build sandboxes run Linux binaries over a network socket and a prepared root image. They have no use for BIOS emulation, PCI bus enumeration, or arbitrary guest operating systems, and fleet scheduling lives entirely outside the VMM. In Firecracker's design, the host configures each microVM over a local Unix socket through a minimal REST contract before booting the guest:

PUT /machine-config HTTP/1.1
Content-Type: application/json

{"vcpu_count": 2, "mem_size_mib": 256, "smt": false}

PUT /boot-source HTTP/1.1
Content-Type: application/json

{"kernel_image_path": "/srv/vmlinux.bin", "boot_args": "console=ttyS0 reboot=k panic=1 pci=off"}

Defense in depth extends to the monitor process itself. Before a microVM boots, a companion jailer wrapper places Firecracker inside chroot isolation, Linux namespaces, cgroups, and strict seccomp syscall filters. Shrinking the emulated device surface reduces guest-to-VMM attack paths, while sandboxing the VMM limits host blast radius if a bug survives anyway.

Hardware compatibility carries permanent maintenance and security tax on every emulated device. When a compute platform stays disciplined about supporting only Linux guests with minimal virtio I/O, booting in roughly 125 milliseconds under 5 MB of memory overhead per microVM becomes achievable. End-to-end cold start in production still includes image staging and runtime initialization above that VMM floor.

Firecracker works because its exclusions match its workload: bounded guest support, minimal devices, a jailed monitor, and external orchestration.

Source: Agache et al., Firecracker: Lightweight Virtualization for Serverless Applications, USENIX NSDI 2020 (conference page).

Continue in Paper Reviews