Rudder
article 05 · cloud build infrastructure 2026-12-01 · 10 min read · cloud builders · rsync · sccache · buck2

Sub-Minute Rust and Monorepo Builds from Any Agent: Rudder's Multiplexed 16-CPU Burst Pool

Interactive coding agents spend 95% of wall-clock time waiting on LLM token streams and reading small source files, and 5% pegging every CPU core on cargo test --workspace or npm run build. Provisioning 16 dedicated vCPUs per sleeping agent home wastes 10x on compute; running 4 concurrent Rust links on a shared 2-vCPU home starves PTY responsiveness and triggers OOM kills. Here is how rudder-burst decouples interactive homes from elastic 16-CPU builders.

source cloud/worker/burst.mjs cloud/worker/builder.mjs cloud/worker/burst-protocol.mjs cloud/worker/buck2-cache.mjs cloud/src/builders.ts

Why agent compute is violently bimodal

A persistent Rudder Cloud home hosts your repositories, warm OverlayFS snapshots, live PTYs, and Tailscale preview servers so your agents keep running when your MacBook lid closes. Most of the hour, four active agents consume less than 250 MB of RAM and 0.1 vCPU combined. Then two agents finish editing Rust crates simultaneously and invoke cargo test --workspace:rustc spawns 16 LLVM codegen units, ld maps gigabytes of debug symbols, and load average spikes 40x within three seconds.

Instead of oversizing every Cloud home 24/7, Rudder maintains a regional warm pool of dedicated 16-CPU builder machines managed by cloud/src/builders.ts and exposes a transparent CLI wrapper, rudder-burst, right on every agent's $PATH.

Lease renewal, isolation, and local fallback

When an agent runs rudder-burst cargo test --workspace, cloud/worker/burst.mjs talks to the home supervisor over a local Unix domain socket (RUDDER_BURST_SOCKET), never exposing builder pool credentials or Fly control-plane tokens inside the agent's environment:

  1. Fast lease acquisition: The supervisor requests an idle 16-CPU machine from the control plane with a default 10-minute lease (renewed automatically on a heartbeat timer while the build streams output).
  2. Single-tenant execution per lease: While leased to a home, the builder accepts signed session frames exclusively for that lease ID and wipes ephemeral credentials on release.
  3. Transparent local fallback: If a self-hosted home has no burst pool configured or every builder in the pool stays busy past --wait, rudder-burst executes the exact command locally with identical exit codes and environment variables so agent workflows never hard-fail on pool capacity.
Cloud Home (Interactive) Agent jj workspace small source delta rudder-burst CLI RUDDER_BURST_SOCKET --pull target/release/bin Multiplexed Transport 1. HTTP Upgrade: rsync (--filter=:- .gitignore) 2. WS binary frames: stdout · stderr · exit 16-CPU Burst Builder /builds/<repo-key>/ warm target/ preserved! same relative subdir sccache + bazel-remote 127.0.0.2 loopback cache
Source trees sync in milliseconds by leaving .git and .gitignore outputs behind while keeping target/ warm on the builder.

Tunneling native rsync --server over HTTP Upgrade without SSH

Archiving a 300 MB monorepo into a tarball on every test run would spend more time in gzip and network I/O than compiling. Running SSH daemons across ephemeral builder containers brings host-key management and port routing overhead. Instead, burst-protocol.mjs speaks raw HTTP Connection: Upgrade with custom protocol RSYNC_UPGRADE = "rudder-rsync-v1":

  • On the home, burst.mjs spawns local rsync using a custom --rsh helper script that opens an HTTP Upgrade socket through the supervisor straight into builder.mjs's raw duplex stream connected to rsync --server.
  • The upload passes --delete combined with --filter=:- .gitignore and excludes .git/ and .jj/ by default (unless --git is explicitly requested for build scripts that inspect git tags).
  • Because --filter=:- .gitignore tells rsync to neither transfer nor delete ignored paths on the receiver, the builder's multi-gigabyte target/ and node_modules/ directories survive intact across runs while modified .rs and .ts files transfer in ~80-200 milliseconds via rolling block checksums.

Sharing warm build directories across secondary agent workspaces

By default, rudder-burst derives its builder directory key (/builds/<key>) from the repository identity rather than the ephemeral agent workspace path. When Agent 1 finishes compiling 480 workspace crates in .rudder-workspaces/repo/agent-1 and Agent 2 starts testing a 12-line patch in .rudder-workspaces/repo/agent-2, Agent 2 syncs its tree onto the warm builder directory, recompiles only the 1 touched leaf crate, and streams test results back over binary-framed WebSocket channels (FRAME.STDOUT, FRAME.STDERR, FRAME.EXIT).

If a release script needs the resulting Linux or macOS binary back on the home filesystem (for example, running TUI integration tests against a freshly compiled target/release/rudder-native), repeatable --pull <relative-path> flags run a reverse HTTP-Upgrade rsync pass before releasing the lease.

Compiler-level caching: sccache and bazel-remote on 127.0.0.2

Even when two concurrent agents lease two separate 16-CPU machines simultaneously, they should never compile identical third-party crates twice. builder.mjs and cloud/worker/buck2-cache.mjs layer object-level caching underneath the directory cache:

  • RUSTC_WRAPPER=sccache with CARGO_INCREMENTAL=0: Builders run sccache backed by shared object storage. Disabling Cargo's local incremental split-object mode (CARGO_INCREMENTAL=0) allows sccache to hash pure crate inputs and achieve >94% cache hit rates across distinct machines.
  • Loopback isolation on 127.0.0.2: For repositories using Buck2 or Bazel, buck2-cache.mjs supervises bazel-remote bound to 127.0.0.2 (separate from ordinary 127.0.0.1 app dev servers) with automatic health probes and disk LRU eviction, giving Buck2 action caches gigabit local gRPC reads without external configuration.

Zero-ceremony agent adoption in 779 bytes

Build infrastructure only saves wall-clock time if coding models actually invoke it without wasting five turns discovering custom scripts. Our 7-day trace study across 2,548 sessions showed that sprawling multi-page system prompts dilute tool obedience, while naming rudder-burst concisely inside Rudder's compact 779-byte execution rule (WAIT_AND_READ_RULE in src/brain.ts and native/src/tasks.rs) alongside the bundled rudder-burst skill caused Claude, Codex, and Gemini agents to wrap full Cargo and monorepo builds automatically on the first try.

Cloud homes that stay snappy during full Cargo builds.

Run agents 24/7 with your laptop shut on Rudder Cloud while heavy Rust, Go, and TypeScript builds burst onto dedicated 16-CPU machines automatically.

$ npm install -g @exla/rudder@latest