Skip to content
Tech News
← Back to articles

What is Firecracker? (A beginners intro)

read original get Firecracker MicroVMs Kit → more articles
Why This Matters

Firecracker is a lightweight virtualization technology developed by AWS that enables rapid, secure, and resource-efficient deployment of serverless functions and containers. Its design addresses the security limitations of traditional Linux containers by providing stronger isolation, making it a significant advancement for scalable cloud infrastructure and serverless computing. This innovation benefits both the tech industry by optimizing resource usage and consumers through more secure and reliable cloud services.

Key Takeaways

Every day, AWS Lambda runs trillions of function invocations. AWS Fargate schedules millions of containers. Every one of those is a full virtual machine, with its own kernel, booted in a fraction of a second.

How? About 50,000 lines of Rust called Firecracker, which exists because the industry finally admitted that a Linux container that controls resource usage was never designed to be a security boundary.[1]

The isolation problem

Every Docker container on your laptop is three Linux kernel features in a trench coat:

Namespaces are blindfolds. A process inside one gets a private view of the system: its own PID list, network stack, mount table, hostname, and user IDs. PID 1 inside the container is some random PID on the host; the container can't even see the other processes.

A process inside one gets a private view of the system: its own PID list, network stack, mount table, hostname, and user IDs. PID 1 inside the container is some random PID on the host; the container can't even see the other processes. cgroups are budgets. Control groups are the kernel's accounting and rate-limiting layer. They cap how much CPU, memory, disk IO, and network bandwidth a process tree is allowed to consume.

Control groups are the kernel's accounting and rate-limiting layer. They cap how much CPU, memory, disk IO, and network bandwidth a process tree is allowed to consume. seccomp + capabilities are allowlists. capabilities chop root's powers into ~40 separate privileges (bind low ports, load kernel modules, mount filesystems, etc.) so you can grant only the ones you need. seccomp is a per-process filter that decides which syscalls (userspace's only API into the kernel) the process is even allowed to make.

You can prove it yourself without Docker installed:

unshare --user --map-root-user --mount --pid --net --uts --ipc --fork --mount-proc bash

Everything else Docker does (image layers, registries, DNS) is orchestration on top.

... continue reading