interviewpath
  • 0day streak
  • 10total XP
  • Level 1

Firecracker: Lightweight Virtualization for Serverless Applications

Alexandru Agache, Marc Brooker, Andreea Florescu, Alexandra Iordache, Anthony Liguori, Rolf Neugebauer, Phil Piwonka, Diana-Maria Popa. NSDI 2020, 2020.

Open the paper(opens in a new tab)Planning estimate 4 h (editable through its topic)

Who should read it

Read it if you are preparing for cloud or systems research, or for infrastructure roles where isolation, multi-tenancy and serverless platforms come up: it is a compact case study in trading isolation against overhead, with production context. It is not needed for application-level serverless usage or for roles without systems interviews, and it does not teach virtualization from scratch; refresh how a hypervisor works first if KVM and virtio are unfamiliar.

Study objectives

  • Explain the six requirements the authors set for Lambda’s isolation solution and say which can be measured and which remain qualitative.
  • Compare Linux containers, language-VM isolation and hardware virtualization as the paper frames them: security boundary, compatibility and overhead.
  • Describe Firecracker’s device model, API, rate limiters and jailer, and how each contributes to isolation or density.
  • Explain how Lambda uses microVMs (slots, MicroManager, placement, pre-booted pools) and the statistical argument behind soft allocation.
  • Identify what the evaluation measures, against which baselines and on what testbed, and what it does not measure.

Prerequisites

Main concepts to understand

  • Security boundary: syscall filtering in containers versus a hardware-virtualization boundary with a small VMM
  • Trusted computing base and attack surface: minimal device model, no BIOS or PCI, block devices instead of filesystem passthrough
  • Defense in depth: the jailer (chroot, namespaces, seccomp-bpf, dropped privileges) around each VMM process
  • One VMM process per microVM, relying on the host kernel for scheduling, memory management, block I/O and TAP networking
  • Token-bucket rate limiters on virtual network and block devices for performance isolation
  • Soft allocation and oversubscription as a statistical bet on uncorrelated workloads
  • Pools of pre-booted microVMs sized with Little’s law
  • Side-channel mitigations as host deployment guidance (for example disabling SMT), outside the VMM itself

What to inspect in the evaluation

  • Baselines: which VMMs are compared (QEMU and Cloud Hypervisor), which versions and build options, and whether kernel, boot path and firmware were configured comparably.
  • Boot-time methodology (Section 5.1): what interval is measured, serial versus concurrent launches, number of samples, and the difference between end-to-end and pre-configured Firecracker; read Figures 5 and 6 as distributions, not single numbers.
  • Memory-overhead methodology (Section 5.2, Figure 7): how overhead is computed from the VMM process’s memory map and what the calculation excludes.
  • I/O results (Section 5.3, Figures 8 and 9, Table 1): block and network workloads, where Firecracker is weaker than the alternatives, the authors’ explanations (serial I/O handling, no flush on write) and the durability implications.
  • Testbed scope: one bare-metal instance type for all controlled experiments, versus production statements about Lambda that are reported experience.
  • What is not measured: strength of isolation, side-channel resistance, density limits under real mixed workloads, and function tail latency under oversubscription.
  • Artifacts: the paper links the experiment configuration and data; check what you could reproduce and on what hardware.

Guarantees versus empirical results

Correctness or design arguments

  • Isolation argument: moving the security-critical interface from the syscall boundary to hardware virtualization plus a small VMM in a memory-safe language reduces attack surface; the authors state that isolation remains qualitative.
  • Compatibility argument: a full Linux guest kernel runs unmodified binaries, avoiding the syscall-filtering versus compatibility trade-off of containers.
  • Defense-in-depth argument: the jailer constrains the VMM process even if a guest manages to compromise it.
  • Design reasoning for sizing pre-booted pools with Little’s law and for oversubscription as a statistical bet that holds for uncorrelated workloads.

Empirical results (depend on setup)

  • Boot-time distributions for serial and concurrent launches against QEMU and Cloud Hypervisor (Figures 5 and 6).
  • Per-VM memory overhead as a function of configured VM size (Figure 7).
  • Block I/O throughput and tail latency, and network throughput, against bare metal and the other VMMs (Figures 8 and 9, Table 1).
  • Production observations from migrating Lambda and the oversubscription ratios reported in Section 5.4, which are not independently reproducible.

Reading plan

  1. Pass 1 (about 30 minutes): abstract, introduction including Section 1.1, the requirements list at the start of Section 2, Figure 1, Section 5.4 and the conclusion. Write the problem and the claimed contribution in two sentences each.
  2. Pass 2 (about 90 minutes): Sections 2.1 to 3.4.1 (isolation options, device model, API, rate limiters, security and jailer) and Section 4 (Lambda architecture, multi-tenancy, deployment). Map every design choice to one of the six requirements.
  3. Pass 3 (60 to 90 minutes): Sections 5.1 to 5.3 with Figures 5 to 9 and Table 1. For each result note the baseline, configuration and metric, and whether it supports a requirement directly or indirectly. Finish with two threats to validity and one follow-up experiment.

Discussion prompts

  • Which of the six requirements can be measured, and how would you design a study of isolation if you had to?
  • The VMM relies on the host kernel for scheduling, memory management and I/O. What does that buy, and what does it add to the trusted computing base?
  • Why does boot time still matter when Lambda keeps a pool of pre-booted microVMs?
  • How does the statistical case for oversubscription break when co-located workloads become correlated, for example the same customer or the same event?
  • Block I/O was weaker than QEMU in the paper’s evaluation. Which serverless or container workloads would notice, and why?
  • Compare Firecracker with gVisor-style user-space kernels and with unikernels on compatibility, isolation and startup.

Related topics

Your structured notes

The guide above is an original annotation; write your own reading of the paper here.

What tension between isolation, compatibility and density did Lambda face when running containers inside per-customer VMs?

What do the authors assume about guests (Linux, no special hardware), workloads (small functions, many per host) and the threat model (malicious tenants, side channels)?

Describe the VMM, device model, API, rate limiters and jailer, and how a Lambda worker uses microVMs, slots and pools.

What is new: the VMM itself, the specialization argument, the production integration or the evaluation? Rank them and justify the order.

Which figures and tables support the fast-switching, overhead and performance claims, and what exactly does each measure?

Which VMMs and settings serve as baselines, and were they configured comparably (kernel, firmware, boot path, rate limiting disabled)?

Which design choices are isolated experimentally, such as pre-configured versus end-to-end boot, and which are never varied?

List the limitations the authors state (I/O path, no flush, missing features) and those you add (single testbed, isolation not measured).

What would you need to reproduce the boot-time experiment (KVM host, guest kernel configuration, root filesystem), and which artifacts do the authors provide?

Propose one experiment, for example function tail latency under oversubscription, or snapshot restore versus cold boot on your own host.