All work

Reliability & Automation

The Fleet Worker Pool

Any machine can do any job, a stranger's code runs somewhere with no home to go back to, and the list of what a machine can do is not allowed to lie about it.

Designed, built, and operateNode.jsbubblewrapSSH tunnelsMulti-provider LLM routingsystemd
  • One worker binary runs every project's jobs, so there is one attack surface to hold instead of one per project.
  • Sandboxed code reaches no secret, because the secrets are not in its namespace to deny.
  • Routing heals itself across sixty models as providers throttle, retire and restore them.

The problem

Per-project worker pools mean per-project secrets, per-project deploys, and per-project bugs. One generic worker means one attack surface, which is only an improvement if that surface is actually held.

Federated, not central

Each application keeps its own jobs table and its own endpoints for claiming work and reporting back. The worker polls all of them off a list. There is no central hub sitting in the middle holding everybody's data, because a central hub is one convenient place to steal all of it from.

That matches the per-tenant isolation story the regulated platforms are sold on, and it keeps every credential narrow: a worker holds a per-source secret by indirection, never a master key.

The sandbox is the only thing between a caller's code and the box

Arbitrary caller-supplied code runs as a non-root user inside bubblewrap with the home directory unmounted. The API keys and tunnel material are not merely permission-denied, they are not present in the namespace. No network unless the job asks for it. Hard kill on timeout.

It fails closed: no sandbox binary present, and the capability is not advertised at all. A smoke test asserts each of those properties individually, and the repository says plainly that if that test fails, the fleet is handing out root, not that the test is stale.

Honest capabilities

A box advertises only what it can actually execute. A language runtime installed under a user's home directory is withheld, because the sandbox cannot see it. Browser capability gates on a real engine binary, not on the package being installed.

Claiming a capability you then fail is worse than not claiming it: the scheduler routes work to a lie, and the failure surfaces as a mystery instead of a gap.

Model routing that heals itself

A balancer holds one slot per model per key and rotates through them, benching a model when it fails and dropping it for good when the provider says it no longer exists. A probe runs on a short timer, pings every model the box has a key for, and rewrites the active list underneath the balancer, which picks it up without a restart.

So the roster turns over on its own as providers rate-limit, retire and restore models. Without anyone editing a config.

Vision routing is a hard filter, not a preference, because a text-only model handed an image returns a 400. The upstream catalog tracks no modality, so the allowlist is probed rather than declared: each candidate was sent a red image and a green image and had to name both colours.

Engineering decisions

The calls I made, and what each one cost.

Callers own retries; the worker only retries result delivery.

A worker that retries the caller's business logic is a worker that decides how many times a payment gets attempted.

Slots measure capacity; the headline measures variety.

A second account with the same provider repeats all of that provider's models in the rotation. That buys more free quota and more concurrency, not more choice. Reporting them as the same number would be a vanity metric.

Namespace your process names before you script against them.

An un-namespaced pattern kill aimed at a stray process was terminating the worker daemon itself on one box. Renaming the entrypoint cost five minutes; finding it cost a day.

More systems

I'm looking for Incident Commander and SRE roles.

If your team is drowning in toil, alert noise, or incidents that never quite close. That is the work I do.

Get in touch