Read the original at figma.com ↗figma.com
Figma built Nimbus, a centralized platform for managing tens of thousands of sandboxes that safely run untrusted AI-generated code. The system uses a declarative namespace configuration (similar to Kubernetes operators) to abstract provider complexity, maintains warm pools of pre-provisioned sandboxes to reduce latency by 90%, and enforces consistent security policies across multiple cloud providers. Nimbus automatically routes around provider degradation and handles health checks, making sandbox infrastructure transparent to product teams.
01Key takeaways
- Use declarative configuration (namespaces) to abstract infrastructure complexity and let product teams focus on behavior, not provider details.
- Warm pools reduce provisioning latency by 90% and provide natural buffer against provider outages; size them dynamically based on claim velocity.
- Distinguish read from write permissions in network policies to enable features like web search while blocking credential exfiltration.
- Encrypt credentials until the moment of use and only send them to intended destinations, preventing malicious code from accessing plaintext secrets.
- Simulate control loops under realistic failure scenarios (provider degradation, mass failures) to catch subtle issues before production.
- Adjust provider weights based on provisioning latency, not just success/failure, to route around slow providers before they become bottlenecks.
02Key sections
- The sandbox scale problem
- As Figma shipped more AI features like the design agent and Figma Make, managing tens of thousands of sandboxes across multiple products with different resource and permission requirements became untenable. Figma needed a centralized platform to handle provider-specific complexity while maintaining consistency.
- Nimbus architecture and the namespace contract
- Nimbus uses a declarative namespace configuration that separates product intent from platform implementation. Products declare what sandbox they need (image, resources, health checks, security policies); Nimbus handles provider selection, resource allocation, and lifecycle management. This mirrors the Kubernetes operator pattern.
- Security beyond container boundaries
- Containers alone aren't enough; Nimbus enforces network policies that distinguish reads from writes. Trusted hosts can send and receive data; untrusted destinations only allow read-only requests (GET, HEAD, OPTIONS). Credentials are encrypted until the moment they're used, preventing exfiltration by malicious code.
- Warm pools and dynamic scaling
- Pre-provisioned warm sandboxes cut latency by 90% and absorb provider outages. Nimbus dynamically sizes pools based on claim velocity and provider health, using Postgres transactions to ensure each sandbox is claimed exactly once without global locks.
- Provider resilience and health checking
- Nimbus adjusts provider weights based on provisioning outcomes, automatically shifting traffic away from degraded providers. Continuous health checks via Redis-backed queues detect failures early; the system waits for repeated failures before marking sandboxes unhealthy to avoid false positives.
- Testing the control loop
- Figma built a simulator to test the warm pool control loop under production-like conditions (deployments, provider degradation, mass aging). Simulation revealed issues like slow provisioning requests appearing successful, leading to fixes like immediate pool observation and weighted routing adjustments.
“Warm pools cut our provisioning latency by 90% compared to spinning up a new sandbox each time.”Pratik Agarwal & Jordan Rogers · figma.com
“Nimbus's provisioning availability increased from 99% to 99.95% as a result of the warm pool and automated provider selection.”Pratik Agarwal & Jordan Rogers · figma.com
03Frameworks mentioned
Summary and takeaways written by PM Atlas; quotes are short excerpts. © the original author.