Skip to content

Sizing and capacity planning

Xratu has two capacity questions, and they are answered separately.

The first is the platform lane: the control plane, the tenancy policy above it, each data plane installation and the per-node limits. This lane carries authoring, build, deployment, supervision and evidence return. It is sized by how many projects you deploy and how often, not by how much your agents do.

The second is the project runtime: once a project is deployed, its kernel executes that project's agents and workflows on its own. Run traffic does not travel through the control plane or the node, so no control-plane or node limit bounds it. A project runtime is sized by the work its own agents perform.

Keeping these apart matters, because raising a node limit does nothing for run throughput, and a busy project runtime places no load on the control plane beyond the evidence it returns.

The rest of this page covers the platform lane in the order you configure it, then the project runtime. The shipped defaults are a single-tenant baseline rather than a fleet configuration.

The control plane

The control plane is one Deployment running two active service roles in separate containers. Each container carries the same request and limit:

        resources:
          requests:
            cpu: "250m"
            memory: "512Mi"
          limits:
            cpu: "500m"
            memory: "1Gi"

The shipped manifest runs a single replica. The controller role takes a named lease and has single-active behaviour when you run more than one replica. The api role scales with client and node traffic, since every CLI call, API call and node pull terminates there.

Storage depends on the backend you latch on first start. The shipped manifest mounts a 1Gi persistent volume for a file-backed default; a backend selected for a fleet is sized as its own database rather than as a volume on the pod. That choice cannot be revisited later, which makes it the one sizing decision with no second chance. See Storage backends and profiles.

Deployment-level tenancy policy

Above the pods sits a tenancy policy that bounds how much the deployment will admit at all. The defaults are deliberately small:

Bound Default
max_tenants 1
max_active_dataplanes_per_tenant 1
max_active_runtime_instances_per_dataplane 64
rate_limits.watch_per_minute 120
rate_limits.pull_per_minute 240
rate_limits.report_per_minute 480

The first two are the ones that surprise people. A deployment left at its defaults accepts one organisation and one active node for it, so a second node is a policy change and not merely another installation. The third is the ceiling on how many project runtimes one node may have active, which is how many deployed projects a single node can supervise.

The rate limits bound one thing only: how often a node may watch, pull and report against the control plane. They shape how quickly a fleet converges on desired state, and they are the figure to review when you add nodes. They have no bearing on what a deployed runtime does.

These live in the control-plane bootstrap profile:

deployment:
  tenancy_policy:
    max_tenants: 1
    max_active_dataplanes_per_tenant: 1
    max_active_runtime_instances_per_dataplane: 64
    rate_limits:
      watch_per_minute: 120
      pull_per_minute: 240
      report_per_minute: 480

See Deployment anatomy.

Per installation

An installation is one deployment target, and dp_count sets how many nodes it runs. Scaling an installation means changing that count and letting install materialise the additional nodes, including their enrollment material.

Because nodes are a StatefulSet with retained volumes, each additional node brings its own durable state: identity, bootstrap seed and cursor state under /var/lib/xratu. The manual template's baseline volume is 1Gi. Node storage is not incidental, because it holds the continuity state that makes a restart a continuation rather than a re-enrolment.

Adding capacity across regions or clouds is a second installation rather than a larger one, since provider configuration, registry, bucket and identity binding are per installation. See dp_count and Installation targets.

Per node

Each node carries its own limits, which bound how much platform work it takes on at once:

Limit Default
max_worker_slots 32
max_assignments_per_pull 4
heartbeat_seconds 15
telemetry_flush_interval_ms 1000

These are declared in the node's bootstrap profile alongside its protocol versions:

  pull:
    protocol_version: dataplane.v1
    assignment_schema_version: assignment.v1
    heartbeat_seconds: 15
    max_assignments_per_pull: 4
    max_worker_slots: 32

max_worker_slots is how many assignments the node works on concurrently. Those assignments are platform work: resolving a closure, building an image, reconciling a project runtime, publishing an artifact. max_assignments_per_pull bounds how many it accepts in one exchange, which shapes how quickly a cold node fills and how evenly work spreads across several nodes.

Neither figure bounds anything your agents do. A node with every slot busy is a node performing several builds and deployments at once, not a node running several agents.

The node does not apply these blindly. Its queue is bounded and applies fairness and backpressure rather than accepting unbounded work, and a performance governor adapts pull rate, concurrency and flush behaviour from observed pressure. Raising a limit therefore raises a ceiling; it does not force throughput the node's CPU and memory cannot support.

Two more node-local consumers need room. The artifact and environment cache holds materialised artifacts and resolved closures, and grows with the number of distinct projects and versions a node serves. The telemetry outbox and audit spool are segmented spools bounded at 64 MiB and 128 MiB, held for the life of the xratud process, which is what lets a node keep reporting while the control plane is unreachable.

The project runtime

Run capacity is a property of the deployed project runtime, sized by the resources you give that runtime rather than by anything in the platform lane.

Every reusable capability block executes in its own cell, and a cell is a process with its own filesystem, import and native loader views. A run touching several distinct blocks therefore holds several processes at once, and an agent holds them for as long as it keeps iterating. The multipliers to work from are the runs you expect to be in flight concurrently and the number of distinct blocks a typical run touches.

The kernel keeps its own state bounded rather than elastic. Handles, resources, tasks, calls, streams, buffers, file descriptors, child processes and the evidence spool are all bounded, so a runtime under pressure refuses or queues work instead of exhausting itself. Capacity planning here is about how much you want admitted concurrently, not about protecting the runtime from collapse.

What the node contributes is placement and supervision, not execution. One node may supervise many project runtimes, capped by max_active_runtime_instances_per_dataplane, and each of those runtimes consumes its own cluster resources.

Where the numbers come from

The values above are the declared defaults in the shipped contracts and manifests, and they are the starting point rather than a recommendation for your workload. Absolute throughput and latency budgets are hardware-dependent and are not published as product figures, so measure against your own workload rather than planning to a stated rate.

The full set of shipped defaults is collected in Limits and defaults. Quota and fairness behaviour at run time is covered by Fairness and quota.

Practical order

Size in the same order you deploy.

Start with the control plane and its storage backend, because it is latched. Raise the tenancy policy to the fleet you actually intend to run, because the defaults admit one organisation and one node. Then choose how many installations you need, one per target, and set dp_count and the per-node limits for the build and deployment load you expect.

Size project runtimes separately, from the behaviour of the agents and workflows they run. That is the number you will revisit most often, and it moves independently of everything above it.