DEMO/Infrastructure

← Back to dashboard

Where work runs: remote workers and remote agents

Audience: operator · Profile: both · Read this when: you are deciding how the dashboard should reach the infrastructure it manages, before you set up a remote worker or a remote agent.

Part of Platform. This is the high-level picture. The two pages it points at, Remote Worker and Remote Agents, have the detail.

Two ways to do the work

Most of what the dashboard does is a call to a cloud API, and the dashboard makes that call itself. Some work has to happen on or beside infrastructure instead: running a playbook against a VM, applying a manifest to a cluster, converting a disk image, inventorying a hypervisor, hosting a Gateway. That work has to run somewhere with a route to its target, and the dashboard offers two ways to put it there:

Both run configuration jobs: a Config Management playbook or script can go either way and end up with the same result. Beyond configuration, each does a good deal more, and not the same things (see What each one does). Customers can use either approach, or both side by side. The dashboard does not prefer one over the other.

A third, simpler option exists for a dashboard that already sits on the same network as its targets: the local runner, a sibling container on the dashboard host. It is one of the remote worker's backends; see Remote Worker.

Comparing them

Remote worker Remote agent
Lifetime One container per job, destroyed when it exits One long-running container that polls for jobs
Where it runs In the target's cloud, on that cloud's network Anywhere you can run a container: a datacenter, a branch office, a cloud VM, a laptop
What it can reach What that cloud network can reach: the VPC or VNet and anything peered or routed to it Whatever the network it sits in can reach, including networks the dashboard and the clouds have no route to
Who runs it The dashboard launches it on demand You, or the owner of the network it sits in
Network setup A cluster, subnet, security group and role in each cloud you use Outbound HTTPS 443 to the dashboard, nothing inbound
Identity The cloud task's own role, for the length of one job Attests to the dashboard through SPIFFE at every start (recommended), and signs every request
Trust boundary The job's lifetime: nothing survives it policy.yaml on the agent's host, which the dashboard cannot read or change

The remote worker: ephemeral

Pros - Nothing persists. No standing host to patch, monitor or secure between jobs, and nothing left behind that a later job, or an attacker, could reuse. - Every job starts from a clean, known image. - It runs on the target cloud's network with that cloud's identity, so a private subnet needs no route back to the dashboard. - It gets clean egress, which side-steps a TLS-inspecting corporate proxy that would otherwise break calls to a private cluster API. - It scales per job and costs nothing when idle.

Cons - It can only reach what its cloud network can reach. A datacenter with no connection to that cloud is out of reach. - Each cloud you use needs its own setup: cluster, subnet, security group and role. - Every job pays a cold start.

The remote agent: persistent

Pros - It reaches places the dashboard cannot, such as on-premises datacenters and isolated networks, with only an outbound connection. - It runs anywhere a container runs, in any cloud or none. - The host owner keeps the security boundary in a file they own, policy.yaml. That suits a network whose owner is not the dashboard's operator, often a different company. - It is already there when a job arrives, so there is no cold start.

Cons - It is a long-running process that someone has to host, update and monitor. - It is a standing identity on someone else's network. That is why the dashboard does not trust an agent until it attests, and why attesting through SPIFFE is the recommended way to run one. - Work waits for the next poll, every 5 seconds by default.

What each one does

Configuration is the overlap. Everything else is specific to one of them.

Remote worker

Remote agent

Most of the agent's list needs something already present inside the network, which a cloud task launched on demand cannot be. Most of the worker's list needs a cloud's own network and identity, which an agent on someone else's network does not have.

Choosing

Scaling configuration in the cloud

On a large cloud estate, the remote worker's limit is the dashboard, not the clouds. Each cloud-VM run holds one of the dashboard's job-worker slots for as long as it runs. There are at most four heavy slots per worker, and every line of Live Output is its own database write. Raising the caps or adding worker replicas puts more load on the database, which is why the job worker docs advise raising the caps before adding replicas.

Remote agents add capacity outside the dashboard's worker:

The tradeoffs to accept:

The details are in Agent-executed Config Management → Cloud VMs.

Page Read it when
Remote Worker you are configuring the one-shot cloud runners for Ansible, Kubernetes and image promotion
Remote Agents you need to reach a network the dashboard cannot, and want the trust model, the architecture and the agent's pages
How a Config Management run executes you want to know which path a single run takes
Why one-shot runners you want the security argument for ephemeral runners