Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 6 min read Opinion easyNovice

Modal is a computer

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. Containers play the role of cores, the container runtime acts as the OS loader and scheduler, images are 'compiled' to filesystems with shared files deduplicated like shared libraries, and the storage hierarchy runs from container memory through page cache, ephemeral disk and Volumes to object storage. The Input/Output Plane, Routing Plane and Tunnels correspond to I/O, networking and RDMA-style bypass. The argument is that this extra virtualization layer aggregates and multiplexes demand for better resource efficiency than raw cloud primitives offer.

Assumes: operating system basicscontainersmemory hierarchy

Related posts

  • Modal's serverless Servers

    Modal mediumAdept

    Modal Servers are a low-latency HTTP/WebSocket/gRPC serving primitive that cut p50 request latency from 39ms to 6ms versus Modal Web Functions by dropping platform-managed queueing and keeping network calls off the hot path. Requests flow through an AWS NLB, an Envoy edge proxy that terminates TLS and normalizes traffic to multiplexed HTTP/2, and fprs, a stateless Rust proxy built on Cloudflare's pingora. fprs maps domains to replicas using an in-memory cache reconciled from Spanner change streams, and it also handles autoscaling signals, proxy-level auth and traffic mirroring. The tradeoff is UDP-like: with no replica available, clients get a 503, and queueing and load shedding are pushed to the application in exchange for minimal routing overhead.

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

    Modal mediumAdept

    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.

  • Modal becomes a gVisor maintainer

    Modal mediumAdept

    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. Modal's upstream work includes nvproxy support for new NVIDIA GPUs, NVLink, MPS and GPUDirect RDMA, plus a new rdmaproxy that reaches ~99% of native NCCL all-reduce bandwidth over InfiniBand, RoCE and EFA. Other contributions are huge-page recycling that lifts PyTorch shared-memory throughput from 2.9 to 22 GB/s and tmpfs work that makes SQLite 2.7x faster. Planned work covers multi-GPU memory snapshots, GPUDirect Storage, MIG/vGPU and sub-minute inference server startup.

  • Lambda on hard mode: Inside Modal's web infrastructure

    Modal mediumAdept

    Modal's modal-http service, written in Rust on hyper and Tokio, serves HTTP and WebSocket traffic for serverless functions by translating each request into a function call instead of reverse-proxying to containers. Requests are represented as ASGI events serialized as Protocol Buffers and streamed over low-latency message queues, with batching (1 MiB or 2 ms chunks) and backpressure propagated through TCP or HTTP/2 flow control. This design lets function calls share the same scheduling infrastructure and supports request bodies up to 4 GiB and unlimited streaming responses, far beyond limits such as AWS Lambda's 6 MB. It also suits long-running, compute-heavy containers that can use up to 64 CPUs and 8 H100 GPUs.

  • How Doppel eliminated ML infrastructure tax with Modal

    Modal mediumAdept

    Doppel, which builds ML models to detect social engineering attacks, moved much of its training and inference from sequential experiments and GCP Cloud Run to Modal. On the training side, independent work such as K-fold cross-validation now runs in parallel via Modal's map(), and coding agents drive the experiment loop through Modal's CLI. For inference, image layer caching and persistent volumes for model weights cut builds from 10–30 minutes by up to 10x, with sub-minute warm builds. Autoscaling absorbs attack-campaign spikes without Cloud Run's one-GPU-per-instance limit, and direct remote calls replace the hand-built Flask HTTP layer around each model.

The quest for software engineering knowledge.

Look:
Layout: