Skip to content

A step-by-step read of Nimbus, the platform Figma uses to run sandboxes for its AI products. Warm pools cut provisioning latency by 90%, and outages are routed around by weighted providers.

Published 1 view

Figma uses sandboxes as a safe place to run code its AI products generate. The Figma agent and Figma Make are the main examples. This piece is a step-by-step read of "How Figma manages sandboxes at scale", written by Figma engineers Pratik Agarwal and Jordan Rodgers and published on the Figma blog on November 4. It is an analysis of the design and figures the article reports, with the parts it does not disclose marked, not an experiment we ran.

Nimbus is a central platform that lets any Figma engineer create, reuse, monitor and delete sandboxes through a simple API. It hides provider-specific details and lets new providers, including homegrown infrastructure, be added without changing how teams work. It launched internally in November 2025 and is now shared by several product surfaces. Figma expected tens of thousands of sandboxes with different memory and network needs across products.

Image: Figma Blog, illustration by Pete Gamlen

The article sets three requirements. For developer experience, a sandbox request should be configuration, not a fork of a service. For isolation and security, the guarantees must be the same across providers. For performance and reliability, a provisioned sandbox should come back in under one second, before the user starts interacting. The table lists the part that serves each.

Parts of Nimbus

Parts of Nimbus
NamespaceA config file from the product with the image, commands, resources and allowed hosts
Control planePicks a provider, sets resources and policy, and manages the lifecycle
sandboxdStarts and supervises processes inside the sandbox and reports metrics
Network policyRead and write to trusted hosts, read-only elsewhere
Warm poolRunning, unassigned sandboxes kept ready per namespace
Weighted routingShares work by each provider's recent results

Source: summarized from the Figma Blog article

A product submits a namespace, a config file, and the control plane handles provider selection, resource allocation, network and security policy and the lifecycle. The article compares this to the Kubernetes operator pattern: the product declares intent and the platform does the work. It lets Figma change providers without affecting teams.

What a namespace holds

What a namespace holds
Container imageA repository
ServicesCommands and ports
Health checkAn HTTP path on a named port
Resources2 CPU, 1Gi memory
Warm pool boundsMin 10, max 100
Allowed hosts*.figma.com

Source: the namespace example in the Figma Blog article

There are three API calls. GetOrCreate takes a namespace and a custom key, returns the same sandbox for the same key and creates one if needed. Get returns the sandbox and its lifecycle state, and Delete tears it down. Every sandbox starts from the same base image, sandbox-base, and inside it a platform daemon, sandboxd, starts and supervises processes, manages network listeners and authentication, runs health checks, reports metrics and handles shutdown. Because sandboxd owns the process tree, it can see CPU, memory and network use and help diagnose failures like out-of-memory crashes.

Image: Figma Blog

Figma works with several cloud providers so sandboxes stay available when one degrades or goes down. Every provider is tested against the same expectations for networking, credentials, lifecycle, observability and failure handling. The article does not name the providers.

AI features sometimes need to read arbitrary web pages, so a strict allowlist is too blunt, but a sandbox must not leak data over the network either. Nimbus splits reads from writes. Trusted hosts listed in the namespace can be both read from and written to. Everywhere else only reads are allowed: GET, HEAD or OPTIONS with no body. POST, PUT and any request with a body to arbitrary endpoints are blocked. Product teams can update the policy of a running sandbox.

If the provider can inspect and control outbound traffic, Nimbus installs the policy natively. Otherwise it attaches a proxy sidecar container and routes outbound HTTPS through it to evaluate each request. It fails closed: if a sidecar can't attach, a policy can't be evaluated or a credential can't be decrypted, the request is refused.

Image: Figma Blog

Credentials are encrypted before they enter the sandbox. The encrypted value is swapped for the real credential just before the request leaves, and only when the destination is the intended one. If untrusted code tries to send the credential elsewhere, all it has is the encrypted value. Because every workload meets the same security requirements, Nimbus can prepare sandboxes ahead of demand.

Instead of creating a sandbox per request, Nimbus keeps a pool of running, unassigned sandboxes for each namespace. The article says the warm pool cut provisioning latency by 90% compared with creating one per request, and that holding a few minutes' worth of sandboxes absorbs short provider outages. Provisioning availability rose from 99% to 99.95%, which it attributes to the warm pool and automated provider selection.

  • Provisioning latency
    90%

    Reduction versus creating per request

  • Provisioning availability
    99.95%

    After the warm pool and automated provider selection, from 99%

  • Readiness target
    1second or less

    Hand back a sandbox before the user interacts

Source: Figma Blog. These are Figma's own figures, not measured by us.

Image: Figma Blog, before and after the warm pool

Several Nimbus pods share one pool, so a sandbox must never be handed out twice. A single Postgres transaction handles it: pick the oldest matching sandbox, skip rows another request is already claiming, remove the row from the pool and return the connection details. It locks per row, not globally.

The pool size is not fixed. The article says a fixed target runs out at peak if too low and wastes money if too high, so Nimbus tracks the claim rate and resizes the pool within the namespace's min and max bounds.

Nimbus starts from configured weights per provider and shifts work by recent provisioning results, so slow or erroring providers get less. The article stresses clean signals. A client cancellation is not counted as a provider outage, rate limiting Nimbus applies to itself does not trip a provider's circuit breaker, and an ambiguous timeout is treated differently from a confirmed failure. Instead of paging an on-call engineer for every provider outage, Nimbus reroutes traffic on its own, and incidents have become rarer.

A Redis-backed queue schedules the next health check for every sandbox, including unassigned warm ones. A single failed check or ambiguous response does not destroy a sandbox; Nimbus waits for repeated failures.

Ask sandboxd firstA response means the container and runtime work
If silent, ask the providerFall back to the provider's view
Provider confirms terminationOnly then mark it unhealthy
For a warm sandbox, claim its pool entry firstSo no request is handed a sandbox being deleted
  • Ask sandboxd first → If silent, ask the provider
  • If silent, ask the provider → Provider confirms termination
  • Provider confirms termination → For a warm sandbox, claim its pool entry first
Source: the health check description in the Figma Blog article

These parts form a control loop that keeps checking each warm pool and correcting toward the target number of healthy sandboxes. Figma also built a simulator that runs the same logic under production-like conditions: wiping a pool during a deployment, aging out many sandboxes at once, and degrading several providers together.

Image: Figma Blog

The bug the simulation found is the most instructive part. Routing first reacted only to outright failures, and a slow but successful provisioning counted as a success. Nimbus waited for each batch to finish before rechecking the pool, so a slowing provider kept draining the pool, and when its batches eventually succeeded it still looked healthy. The deficit grew and Nimbus sent that provider even larger batches. The fixes were two: slow requests now lower a provider's effective weight even when they succeed, and provisioning moved out of the control loop so Nimbus dispatches requests and goes straight back to watching the pool.

A few things to know before quoting the numbers. The text says provisioning availability reached 99.95%, while the chart's description says it approached 99.99%. The period or method may differ, and the article does not say. Latency has the same issue: the text reports a 90% cut, while the chart shows p99 going from about 6 seconds to about 2, which are not the same figure.

The article does not give provider names, a snapshot mechanism, kernel-level isolation, costs, a scale more specific than tens of thousands, or how read-only HTTP is enforced. It says a container boundary alone is not enough and that network and credential policy supply the rest. For future work it lists wider namespace adoption, better autoscaling and provider weighting, latency and cost optimization, and preserving a sandbox's working directory to restore it into another warm sandbox, even from another provider.

Three things are worth taking away. First, making a sandbox request a config file instead of a code fork is what buys the freedom to change providers. Second, a network policy that splits reads from writes, plus credential swapping, is a shape any team that lets AI read the web without leaking data can borrow. Third, the feedback bug the simulation caught can bite anyone building automatic recovery: count slow successes as a signal, and observe instead of waiting. Every figure is one Figma reports, so it is no guarantee you would see the same effect in your own environment.