---
title: "Inside Modal Notebooks: How we built a cloud GPU notebook that boots in seconds"
description: "Modal Notebooks runs Jupyter kernels inside Modal Sandboxes, using a `modal-kernelshim` daemon that translates ZeroMQ kernel protocol messages into HTTP tunneled through the control plane."
url: "https://swe.quest/articles/inside-modal-notebooks-how-we-built-a-cloud-gpu-notebook-that-boots-in-seconds-cfb6050987f03347"
canonical: "https://modal.com/blog/notebooks-internals"
source: "Modal"
published: "2025-09-16"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["system-design","containers","storage-systems","realtime","developer-tools"]
---

# Inside Modal Notebooks: How we built a cloud GPU notebook that boots in seconds

A post on [Modal](https://swe.quest/sources/modal.md), published 2025-09-16, 8 min read, Case study. Original: [https://modal.com/blog/notebooks-internals](https://modal.com/blog/notebooks-internals)

## Summary

Modal Notebooks runs Jupyter kernels inside Modal Sandboxes, using a \`modal-kernelshim\` daemon that translates ZeroMQ kernel protocol messages into HTTP tunneled through the control plane. Fast GPU boots come from a Rust FUSE lazy-loading container filesystem with a content-addressed tiered cache (page cache, SSD, zonal cache, regional CDN, blob storage). Supporting pieces include shared scheduling with idle-kernel pausing and VolumeFS (file trees in Spanner, eventually consistent ops) for persistent storage. Collaboration uses operational transformation via Rushlight over Redis Streams, with large outputs offloaded to S3 Express One Zone, and the editor adds LSP via Pyright, Ruff formatting compiled to WebAssembly, and AI next-edit suggestions.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Jupyter kernels
- containers and images ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- FUSE filesystems

## Keywords

Modal Notebooks, Modal Sandboxes, Jupyter, FUSE, VolumeFS, Rushlight, Redis Streams, Pyright

## Related posts

- [Modal becomes a gVisor maintainer](https://swe.quest/articles/modal-becomes-a-gvisor-maintainer-053bd8f08ca6c19d.md): Modal · 2026-11-11 · Medium · 9 min read · Sandboxing & isolation, Containers, Multi-tenancy, Hardware, Open source
  Google is donating gVisor to the CNCF under maintainer-led governance, and Modal, which launches over 40 million gVisor containers a day for GPU inference, training, and AI sandboxes, is joining as a maintainer. gVisor's Go-based Sentry application kernel implements the Linux syscall interface and is itself confined by namespaces, cgroups and seccomp, giving tenant isolation without hardware virtualization: about 25 ms boot and 12 MB overhead.
- [Memory snapshots: Checkpoint/restore for sub-second startup](https://swe.quest/articles/memory-snapshots-checkpoint-restore-for-sub-second-startup-543b0ee4c645204a.md): Modal · 2025-01-28 · Medium · 9 min read · Serverless, Containers, Sandboxing & isolation, Performance engineering, Linux
  Modal cuts serverless container cold starts roughly 2.5x by checkpointing a gVisor container's full process tree and filesystem mutations just before it accepts a request, then restoring it instead of re-running Python's syscall-heavy import path (import torch alone makes 26,000 syscalls through OverlayFS and a FUSE lazy-loading server).
- [Modal is a computer](https://swe.quest/articles/modal-is-a-computer-270db1c7ccdcba70.md): Modal · 2026-07-09 · Easy · 6 min read · Serverless, Cloud platforms, Containers, Operating systems, System design
  Modal is best understood not as a neocloud or inference provider but as a computer: a virtual machine built across dozens of cloud providers, mapped component by component onto a classic computer architecture.
- [How we achieved truly serverless GPUs](https://swe.quest/articles/how-we-achieved-truly-serverless-gpus-d82b0620ff18c95f.md): Modal · 2026-05-12 · Medium · 23 min read · Serverless, Inference & serving, Containers, Storage systems, Capacity planning
  Modal cuts GPU inference replica cold starts from roughly 2,000 seconds to about 50 seconds, a 40x speedup, by attacking each stage of spin-up.
- [Run GPU jobs from Airflow with Modal](https://swe.quest/articles/run-gpu-jobs-from-airflow-with-modal-53fdd2aef1aa5c6f.md): Modal · 2024-06-20 · Medium · 7 min read · Data pipelines, Scheduling, Serverless, Python, ML platforms
  Airflow DAGs can offload GPU-heavy tasks to Modal instead of standing up Celery or Kubernetes executors, using a two-step pipeline that scrapes Reddit ELI5 questions and answers them with an LLM as the example.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
