Skip to main content

Tenancy & placement

A tenant is sold on a plan and built on a machine. This page is how the two meet: what a plan buys, which machines may hold a tenant at all, and what the control plane books so a machine cannot be sold twice.

A plan buys ceilings, and names an environment​

A plan is registered through the control plane while it runs, and it carries three things:

FieldMeans
cpu_limitcores, as a decimal count
memory_limitmemory, as Docker spells it (512m, 4g)
environmentproduction or development

Those figures are what the tenant's stack is bounded by on the machine and what the control plane books against that machine's capacity. The two are the same numbers on purpose: a stack able to exceed the plan would make the booking wrong, so the machine refuses one that can.

A provision naming a plan nothing describes is refused. What the tenant's ceilings would be is unknown, and a guess produces a tenant served under a ceiling nobody sold.

Raising what a plan buys resizes every tenant on it, each on its next update — so an upgrade is one call plus an update, with nothing to edit on a machine. It is bounded twice: by what the machine grants any single tenant, and by what the control plane still has free there.

Production is one tenant per machine​

A machine holds more than one tenant only when it is a development machine, it has an owner, every tenant on it belongs to that owner, and that owner has attested that those tenants are their own workloads. Otherwise it holds one.

The reason is worth stating plainly, because it is the one claim the whole arrangement rests on: nothing separates two tenants that share a kernel. A network per tenant, dropped capabilities and a non-root user each raise the cost of reaching a neighbour, and none of them is a boundary against a container escape — after which the machine holds every tenant's secrets. Development is different not because the mechanism is stronger there but because a development tenant holds synthetic data, so there is nothing worth reaching.

So co-location is decided by environment and buyer, never by price:

MachineHolds
production, no ownerexactly one tenant
production, with an ownerstill exactly one — production is not shared, attested or not
development, no ownerexactly one tenant
development, owned, buyer has attestedthat buyer's tenants, and only theirs

The attestation is a recorded act (/platform/api/co-location/{buyer}), not a configuration flag, because it is the buyer stating that the workloads sharing a machine are all their own.

A machine is registered while the service runs​

No machine is registered from configuration. A deployment boots with an empty table and refuses to place a tenant until a machine is registered — which keeps infrastructure topology out of the service's configuration and leaves one way for a row to change rather than two that can disagree.

A registration carries where the machine is, what it serves, and what it has:

  • products — the products whose images it runs, as a set. Only those products' tenants are placed there. A machine serving no product is skipped rather than treated as able to serve any: building a tenant from the wrong image produces an instance that answers on a name the edge routes elsewhere while reporting success throughout.
  • environment and owner_account — matched against the plan, as above.
  • cpu_capacity and memory_capacity — what is available to tenants, after whatever else the machine runs. A tenant count is not registered; it is derived, because how many tenants fit depends on what they bought.
  • provision_callback_url and tls_fingerprint — the agent's endpoint and the certificate it presents. The agent answers on a private address, which has no name a public authority issues for, so its certificate is self-signed and the fingerprint is what says which machine is expected.
  • edge_upstream — where the tenant edge sends traffic for this machine.

Describing a machine and setting its state are separate calls. Correcting an agent's address is exactly the kind of thing done while a machine is being retired, so it must not undo the drain.

What is booked against a machine​

A machine's cores and memory are finite whatever is using them, so everything that runs there counts:

  • every tenant placed on it, at its plan's figures;
  • every tenant served from it as a second machine (a replica), at the same figures;
  • every service the platform runs for itself there — the identity provider, for instance — at the ceilings it was given.

That last one closes a rule in both directions: no tenant is placed on a machine the platform is already using for itself (that service's data is the platform's keys, and a tenant beside it shares the kernel), and a machine that still holds tenants does not become one of the platform's own.

When placement cannot answer​

Placement refuses rather than choosing. There is no fallback onto a machine of the wrong environment, the wrong product, or without the room — each would produce a tenant that answers and is wrong, which is worse than a sale that was refused while the buyer was still on the page.

Draining a machine stops new placements and leaves the tenants already there untouched. The answer says how many tenants remain — that count reaching zero is what says the drain is finished — and how many machines of the same environment are still accepting tenants, because draining the last one means the next sale that needs one is refused. Removing a machine that still holds tenants is refused: they would keep running while the fleet comparison stopped asking about them, which is invisible rather than reported missing.

See also​