<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry" -->

---
title: Scaling to 1 million concurrent sandboxes in seconds
description: Modal rebuilt its sandbox platform from the ground up to support 1 million concurrent sandboxes, achievable in under a minute. The new architecture eliminates...
canonical: https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Scaling to 1 million concurrent sandboxes in seconds | daily.dev
og:description: Modal rebuilt its sandbox platform from the ground up to support 1 million concurrent sandboxes, achievable in under a minute. The new architecture eliminates...
og:url: https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry
og:image: https://api.daily.dev/og/posts/sxSiXg1Ry.png
og:image:alt: Scaling to 1 million concurrent sandboxes in seconds
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaling to 1 million concurrent sandboxes in seconds

**[Modal](https://daily.dev/sources/modal_labs)** · 9 min read · 2 upvotes · 0 comments

## Summary

Modal rebuilt its sandbox platform from the ground up to support 1 million concurrent sandboxes, achievable in under a minute. The new architecture eliminates central coordination bottlenecks by replacing a centralized scheduler and durable datastore with a fleet of scheduling servers using in-memory cached worker state published via Redis streams. Workers become their own source of truth, sandbox creation requires only two network hops, and all O(sandboxes) and O(nodes) operations are horizontally scalable. Kubernetes-style strong consistency was traded for performance. Median sandbox start time is under 500ms. The system is in Beta and will soon back all Modal sandbox scheduling.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://modal.com/blog/scaling-to-1-million-concurrent-sandboxes-in-seconds>

## Questions this post answers

### How does Modal's new sandbox scheduling system avoid the bottlenecks that limit Kubernetes at large scale?

Modal removed central coordination entirely: instead of a single serialized scheduler and a durable datastore like etcd, it runs a horizontally scalable fleet of scheduling servers operating on in-memory cached state, while workers publish their own state asynchronously to a Redis stream and act as their own source of truth. Sandbox creation requires no database writes in the critical path, only two network hops and one CPU operation, avoiding the O(nodes) and O(pods) bottlenecks inherent to Kubernetes's etcd-backed scheduler.

_See how daily.dev surfaces infrastructure deep dives for engineers weighing scheduler architectures at scale._

### How many concurrent sandboxes can Modal's new platform run and how fast can it create them?

Modal's rebuilt sandbox platform can run 1 million sandboxes concurrently, created entirely within under a minute, and supports creation rates of tens of thousands of sandboxes per second. Median sandbox start time (time from creation request to running user code) is under half a second, with scheduling itself taking only tens of milliseconds thanks to the removal of central coordination bottlenecks.

_Track infrastructure scaling benchmarks like these on daily.dev before committing to a sandbox or agent runtime._

### Why did many containers starting simultaneously on the same worker cause slow startup times in Modal's new scheduler?

Containers starting at once contended for the rtnl lock in the Linux kernel during container networking setup, causing startup times of tens of seconds under bursty load. Because the new scheduler could push containers to workers extremely fast, this contention became a real bottleneck, requiring a change to the container networking setup specifically to prevent workers from being overwhelmed during creation floods.

_Engineers hitting kernel-level contention bugs during container bursts can find writeups like this via daily.dev._

## Similar posts on daily.dev

- [Sandboxes are a durability problem](https://daily.dev/posts/sandboxes-are-a-durability-problem-usenqd477) · Inngest Blog · 1 upvotes · 0 comments
- [Product updates: VM Sandboxes, Lower latency routing, RBAC, and more](https://daily.dev/posts/product-updates-vm-sandboxes-lower-latency-routing-rbac-and-more-eu4o7sjio) · Modal · 2 upvotes · 0 comments
- [QCon London 2026: Fixing the AI Infra Scale Problem by Stuffing 1M Sandboxes in a Single Server](https://daily.dev/posts/qcon-london-2026-fixing-the-ai-infra-scale-problem-by-stuffing-1m-sandboxes-in-a-single-server-ziuvqxl43) · InfoQ · 0 upvotes · 0 comments
- [SkyPilot Sandboxes: Run Agent Code on Your Own Kubernetes, at Scale](https://daily.dev/posts/skypilot-sandboxes-run-agent-code-on-your-own-kubernetes-at-scale-q6ldvrf5n) · SkyPilot · 1 upvotes · 0 comments

---

Tags: [#distributed-systems](https://daily.dev/tags/distributed-systems)

[View this post on daily.dev](https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Scaling to 1 million concurrent sandboxes in seconds","url":"https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry"},"datePublished":"2026-07-16T20:15:46.083Z","dateModified":"2026-09-14T07:13:19.970Z","description":"Modal rebuilt its sandbox platform from the ground up to support 1 million concurrent sandboxes, achievable in under a minute. The new architecture eliminates...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0fd53688be214bdc129a47a0d199aa5d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0fd53688be214bdc129a47a0d199aa5d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Modal","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Modal","logo":"https://media.daily.dev/image/upload/s--HfKZHzC1--/f_auto/v1750946306/logos/modal_labs","url":"https://daily.dev/sources/modal_labs"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"distributed-systems","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Modal","item":"https://daily.dev/sources/modal_labs"},{"@type":"ListItem","position":3,"name":"Scaling to 1 million concurrent sandboxes in seconds"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/scaling-to-1-million-concurrent-sandboxes-in-seconds-sxsixg1ry#faq","mainEntity":[{"@type":"Question","name":"How does Modal's new sandbox scheduling system avoid the bottlenecks that limit Kubernetes at large scale?","acceptedAnswer":{"@type":"Answer","text":"Modal removed central coordination entirely: instead of a single serialized scheduler and a durable datastore like etcd, it runs a horizontally scalable fleet of scheduling servers operating on in-memory cached state, while workers publish their own state asynchronously to a Redis stream and act as their own source of truth. Sandbox creation requires no database writes in the critical path, only two network hops and one CPU operation, avoiding the O(nodes) and O(pods) bottlenecks inherent to Kubernetes's etcd-backed scheduler. See how daily.dev surfaces infrastructure deep dives for engineers weighing scheduler architectures at scale."}},{"@type":"Question","name":"How many concurrent sandboxes can Modal's new platform run and how fast can it create them?","acceptedAnswer":{"@type":"Answer","text":"Modal's rebuilt sandbox platform can run 1 million sandboxes concurrently, created entirely within under a minute, and supports creation rates of tens of thousands of sandboxes per second. Median sandbox start time (time from creation request to running user code) is under half a second, with scheduling itself taking only tens of milliseconds thanks to the removal of central coordination bottlenecks. Track infrastructure scaling benchmarks like these on daily.dev before committing to a sandbox or agent runtime."}},{"@type":"Question","name":"Why did many containers starting simultaneously on the same worker cause slow startup times in Modal's new scheduler?","acceptedAnswer":{"@type":"Answer","text":"Containers starting at once contended for the rtnl lock in the Linux kernel during container networking setup, causing startup times of tens of seconds under bursty load. Because the new scheduler could push containers to workers extremely fast, this contention became a real bottleneck, requiring a change to the container networking setup specifically to prevent workers from being overwhelmed during creation floods. Engineers hitting kernel-level contention bugs during container bursts can find writeups like this via daily.dev."}}]}
```

