Workload pools: a noisy tenant holds its bound
DEFINE POOL bounds how much of a node one tenant's statements may take at once — a classifier over the database, the user and the statement kind, and a concurrency ceiling the gate enforces with a named PoolAtCapacity refusal. The counts the console and /metrics carry are this process's own.
On a cluster that serves more than one tenant, one tenant's traffic can take the machine the others share. Workload pools are the admission answer: bounds declared in the catalog, enforced at the gate every statement already passes through, counted where they happen.
From 0.50.0 a namespace can declare pools; the enforcement is engine
admission governance, not metering — a pool refuses work the node cannot take,
it does not bill for work it did.
Declaring a pool
DEFINE POOL prod:web FOR DATABASE prod MAX 8 CONCURRENT;
DEFINE POOL analytics FOR DATABASE analytics READS MAX 2 CONCURRENT;
INFO FOR POOLS;
DROP POOL prod:web;
A pool names a classifier and a ceiling. The classifier is over three
things: the database the statement touches, the user it runs as, and the kind
of statement — READS, WRITES, DEFINITIONS, alone or together. The
ceiling is how many of the classified statements the gate admits running at
once; the kind classifier decides which running statements count against it.
A statement no declared pool matches is admitted as today — pools bound what
they name, and the default names nothing.
The refusal, named
A statement the ceiling refuses answers PoolAtCapacity, naming the pool.
The class is conflict, and the refusal is retryable: the statement did not
fail, it was not admitted while the bound held, and a client that backs off
and retries is doing the right thing. The engine does not queue silently —
the named refusal is the queue's honest spelling.
The bound holds per node, per process: each node enforces the pools it holds against the work it admits. A pool is not a cluster-wide semaphore and does not pretend to be one; the catalog row replicates, the tally is local.
Watching it
INFO FOR POOLS answers each pool's declaration beside this node's own
counts — running and refused, the tally the live gate keeps. The rows answer
to the namespace's manager, the authority declaring a pool already needs, on
the rule that who may run what is answered to who may decide it.
/metrics carries the tessari_pool_running and tessari_pool_refused_total
series with the pool labelled, and the web console's cluster section renders
the pools block from the same answer.
Measured before the defaults were claimed: on a pooled two-tenant cluster, a
saturating tenant's twenty-five reads were all admitted and never counted —
no declared pool matched her — while the bounded tenant's in-flight read held
the pool's only slot and her next read was refused, PoolAtCapacity naming
prod:web. The counters named her running and her refused, and left the
noisy tenant without a row: a pool counts what it bounds, and silence is the
unbounded tenant's honest figure.