Modal

Scaling to 1 million concurrent sandboxes in seconds | Modal Blog

Jul 16, 2026
Scaling to 1 million concurrent sandboxes in seconds | Modal Blog
SummaryAI, from the source post

This post details the complete architectural overhaul of Modal's sandbox platform to achieve massive scale. Key changes include replacing the centralized scheduler and durable datastore (Postgres) with a fleet of horizontally scaled scheduling servers and workers acting as their own source of truth, publishing state to Redis streams asynchronously. This eliminates central bottlenecks and global coordination from the critical path of sandbox creation, reducing it to two network hops and a CPU operation. It also addresses O(sandboxes) RPCs by batching control messages and discusses optimizations for Linux kernel `rtnl` lock contention during high-volume container networking setup.

More from the Sandboxed Code Execution trail