Firecracker microVMs
Firecracker is an open-source Virtual Machine Monitor written in Rust by AWS that uses Linux KVM to run lightweight microVMs with millisecond boot times and minimal memory overhead. It powers AWS Lambda and Fargate by combining the hardware isolation of VMs with the density and speed traditionally associated with containers.
Overview
Overview
Firecracker was open-sourced by Amazon Web Services in 2018. It is the reference implementation of a microVM: a virtual machine stripped of legacy hardware emulation and sized to run one workload rather than a general-purpose OS.
AWS needed to run millions of short-lived Lambda functions with sub-second cold starts and hard multi-tenant isolation. Containers share the host kernel, so they did not isolate enough; QEMU-class hypervisors started too slowly and used too much memory at Lambda scale.
Firecracker's answer is a short chain of small pieces. An orchestrator starts the jailer, which sets up a chroot, cgroups and namespaces and drops privileges. The jailer then hands over to the Firecracker VMM (virtual machine monitor), a Rust process filtered by seccomp. The VMM drives KVM, which runs a guest kernel for one workload, and it emulates only a minimal set of devices: virtio-net, virtio-blk, vsock, a serial console and an i8042 controller.
Key concepts
- KVM Backend and VMM Process Model
- REST API Configuration Over Unix Socket
- The Jailer: Namespaces, cgroups, and seccomp
- virtio Devices: net, blk, and vsock
- Guest Kernel Requirements and Boot Sequence
- Snapshotting and Memory Cloning
- firecracker-containerd and CRI Integration
Interview questions
- Why do serverless platforms like AWS Lambda use microVMs instead of containers for tenant isolation?
- Walk through the full Firecracker boot sequence from the moment an orchestrator makes its first API call to a workload process running inside the guest.
- What specific isolation actions does the jailer take, and what attack surface does each action close?
- Compare the security models of gVisor and Firecracker. When is each the right choice?
- How does firecracker-containerd integrate with the Kubernetes CRI to run container images inside microVMs?
Sign up free to read the full topic
More DevOps topics
- etcd and the API Server — The Write Path, Raft, and Why 3 vs 5 Members Matters
- Event-Driven Architecture
- Event-Driven Automation and StackStorm
- External Secrets Operator
- Feature Flags
- FinOps & Cloud Cost Engineering
- Flux v2
- GCC Toolchain Internals
- GCC Upgrades and ABI Migration
- Git
- Git Migration to GitHub
- GitHub Actions
Start free on Cariara · Coding problems · System design studio