Appendix D: The Resource Model, Annotated
REAL
Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), file orchestrate-core/schema/resource-model.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.
The NoETL resource model: what a playbook costs in time, worker slots, memory, fuel and tool calls, with every figure labelled. The same file is published at noetl.ai/dsl/resource-model.json. Chapter 21 explains how to use it.
Model version 1, figures as of 2026-11-11. Purpose: Plan a playbook's time, slots, fuel, memory and tool calls before running it, then measure the run and refine.
- Latency on NoETL is dominated by orchestration per step, not by the work a step does. Count steps and sub-playbook hops before estimating anything else.
- Measurements are dated and environment-specific. A figure from kind does not transfer to prod, and an older figure may predate a fix.
- Live values beat this file: a running server answers /api/dsl/version; a running worker's limits are its env; actual cost is in the events and metrics listed under metrics.
Labels
Explained in 21.1 Labels.
| Label | Meaning |
|---|---|
| DEFAULT | a code default (env var + value); a deployment may override it |
| DEPLOYED | read off the production cluster on as_of; configuration, not code |
| GUIDANCE | a planning rule derived from the figures; not a measurement |
| MEASURED | observed on a cluster or harness; read environment/date/source before reusing it |
| NOT_YET_MEASURED | a real question with no number; do not invent one |
| TARGET | a goal or budget; not a measurement |
Limits
Explained in 21.3 Limits.
| Label | What | Value | Source | Note | Cost | Costs | Deployed | Env | Gates | Parallel | Unit |
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFAULT | 10000000000 | noetl/worker@d1c9584 src/plugin.rs:41 | 0 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit} | NOETL_WASM_FUEL | fuel units per invocation | ||||||
| DEFAULT | 30000 | noetl/worker@d1c9584 src/plugin.rs:44 | 10 ms deadline granularity | NOETL_WASM_TIMEOUT_MS | ms wall clock per invocation | ||||||
| DEFAULT | 1024 | noetl/worker@d1c9584 src/plugin.rs:47 | NOETL_WASM_MAX_MEMORY_MB | MiB linear memory | |||||||
| DEFAULT | 32 | noetl/worker@d1c9584 src/executor/agent_host.rs:50 | positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budget | NOETL_AGENT_MAX_TOOL_CALLS | tool calls per agent step | ||||||
| DEFAULT | 180 | noetl/worker@d1c9584 src/executor/agent_host.rs:51 | NOETL_AGENT_TOOL_TIMEOUT_SECS | s per playbook-bound child | |||||||
| DEFAULT | 4 | noetl/worker@d1c9584 src/config.rs:115-118 | WORKER_MAX_CONCURRENT | slots per worker process | |||||||
| DEFAULT | 102400 | noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865 | a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetch | NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES | bytes | ||||||
| DEFAULT | 524288 | noetl/server src/config/app.rs:242-246 | a command context above it is offloaded as a context_ref | NOETL_COMMAND_CONTEXT_MAX_BYTES | bytes | ||||||
| DEFAULT | request body limit on /api/execute and /api/events | 2097152 | noetl/server src/main.rs:640-645 (the axum default; no explicit layer) | bytes | |||||||
| DEFAULT | GET /api/executions/{id} events returned | 2000 | noetl/server src/services/execution.rs:694 | most recent events | |||||||
| DEFAULT | 120 | noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140 | extra retry window for event emits during a server outage; the slot stays held | NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS | s | ||||||
| DEFAULT | 150 | noetl/worker@d1c9584 src/worker.rs:1139 | on SIGTERM a worker finishes in-flight commands within this budget | NOETL_WORKER_DRAIN_TIMEOUT_SECS | s | ||||||
| DEFAULT | catalog URI fetch (source: references) | off; the allowlist is empty by default, which fetches nothing (fail closed, HTTP 403) | label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:218-221; unit: s; value: 15; what: http(s) fetch timeout, redirects disabled, label: DEFAULT; source: noetl/server src/services/catalog_sources.rs:46-47; value: 10 s / 15 s; what: db:// connect / query timeout; the connection is opened for one read, label: DEFAULT; source: noetl/server src/services/catalog_sources.rs:49-50, 312, 320; value: worst case 64,000 records scanned; what: ehdb:// read: linear scan, 16 records per page, at most 4000 pages, 60 s per page, label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:76; unit: bytes; value: 1048576; what: fetched body cap (UTF-8 only), label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:591-593, 863-867; value: none: every locate fetches again; the imported body is deduplicated by digest; what: fetch cache, label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:896-951; value: none; what: retries, label: NOT_YET_MEASURED; value: none; what: latency of a URI fetch | label: DEPLOYED; source: prod cluster read, as_of; value: off on prod (no catalog CAS / pinning / discovery / URI flags in the server env) | NOETL_CATALOG_URI_FETCH, NOETL_CATALOG_URI_ALLOW | ||||||
| DEFAULT | version pinning and hot reload | off. With pinning on, a root execution records a catalog watermark before its first event and every bare-path lookup in its tree resolves at or below it; hot_reload only applies to paths the ROOT lists (at most 64 globs) and referenced explicitly as @latest | noetl/server orchestrate-core/src/catalog.rs:338-353, 406-416, 505-529; src/handlers/execute.rs:687-699 | pinning adds no fetch: resolution is a bounded catalog lookup. Without pinning, /api/execute reads the latest catalog row on every request (no cache) | label: DEPLOYED; source: prod cluster read, as_of; value: off on prod | NOETL_CATALOG_PINNING, NOETL_CATALOG_HOT_RELOAD | |||||
| DEFAULT | loops and back-edges (goto) | No server cap on iterations, steps, back-edge repeats or sub-playbook depth. A back-edge re-dispatches its target until the arc's when: guard goes false; the playbook's own guard is the only bound. | noetl/server orchestrate-core/src/orchestrator.rs:150-198, 1119-1240, 1783-1820; src/playbook.rs:778-780 | every iteration and every back-edge pass is a full step: it pays the per-step orchestration cost below and holds a slot | loop.spec.mode: parallel dispatches every item at once. loop.spec.max_in_flight is parsed but has no reader, so it does not throttle anything | ||||||
| DEFAULT | 225 | noetl/server src/config/app.rs:702-726 | how long a stuck execution is re-driven before the server stops | NOETL_RECONCILE_MAX_NOOPS | consecutive no-progress polls at an 8 s tick (~30 min) |
Concurrency
Explained in 21.4 The slot and pool model and 10.4.
autoscaling
deployed
- label: DEPLOYED
- note: ops/ci/manifests also declares a system-pool ScaledObject (3-10); it is not on the cluster, so the system pool does not scale
- source: prod cluster read, as_of
scaled_objects
- cooldown_s: 30; max: 20; min: 2; polling_interval_s: 10; rule: replicas ~ ceil(lag / 2); target: noetl-worker-rust; target_value: 2; trigger: metrics-api: ehdb_feed_subject_lag{subject="commands.shared.shard.0"} from the command-bus writer
measured
| Label | What | Value | Environment | Date | Source |
|---|---|---|---|---|---|
| MEASURED | user pool under 200 real executions (200/200 completed) | replicas 2 -> 4 -> 8 -> 16 -> 20 -> 2 | prod | 2026-07-31 | noetl/ai-meta wiki Home (#210) |
| NOT_YET_MEASURED | time for the user pool to ramp under load on the EHDB trigger | none | |||
| MEASURED | GKE Autopilot node provisioning when a scale-up needs a new node | ~60-90 s | prod | noetl/ai-meta playbooks/load-test/README.md |
measured
| Label | What | Value | Environment | Date | Source | Note |
|---|---|---|---|---|---|---|
| MEASURED | command.issued -> command.claimed, pool not saturated | p50 138.5 / p95 156.4 / p99 181.0 ms (n=60) | prod | 2026-07-30 | noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy) | |
| MEASURED | same, with 90 commands offered in 1.2 s against 8 slots (2 replicas x 4) | p50 2123 / p99 3735 ms | prod | 2026-07-30 | noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy) | this measures the pool queue, not the bus |
| MEASURED | POST /api/execute submit latency by client concurrency (server v3.100.4, 2 reps) | c=1 p50 120-150 ms; c=2 p50 140-150 ms; c>=4 bimodal with errors and 30 s timeouts | prod | 2026-09-03 | noetl/ai-meta wiki Umbrella-Request-Latency | p95 at c=1 rests on single samples |
| NOT_YET_MEASURED | sustained executions per second the platform can complete | none |
pools
| Label | Source | Capacity_slots | Cpu | Memory | Pool | Replicas | Slots_per_replica |
|---|---|---|---|---|---|---|---|
| DEPLOYED | prod cluster read, as_of | 8 at min, 80 at max | 250m request / 2 limit | 256Mi request / 768Mi limit | worker-rust-pool (user pool, Deployment noetl-worker-rust) | 2 (KEDA 2-20) | 4 |
| DEPLOYED | prod cluster read, as_of | 4 | 750m request / 2 limit | 3Gi / 3Gi | worker-system-pool (Deployments noetl-worker-system-pool + -shard1) | 1 + 1, fixed (no autoscaler) | 2 |
routing
- label: DEFAULT
- source: noetl/worker@d1c9584 src/worker.rs:233-244
- text: A worker claims only its pool's subject (commands.
.>); a step reaches a pool through the pool its command is published to. Orchestration of system/* drives runs on the system pool.
slot_model
- label: DEFAULT
- source: noetl/worker@d1c9584 src/worker.rs:313, 748-754
- text: A worker process has WORKER_MAX_CONCURRENT slots (a semaphore). A slot is acquired before the worker pulls a command and released when that command's tool returns. A pool's capacity is replicas x slots; commands beyond it queue on the command bus.
Heuristics
Explained in 21.5 Estimating.
| Label | Source | Rule |
|---|---|---|
| GUIDANCE | Estimate wall clock as steps x per_step_overhead + sum(step work) + hops x hop_overhead, where hops are kind: playbook children. On prod today use ~4.5 s per step and ~9-15 s per hop (orchestration_overhead.measured), and re-measure: the overhead, not the work, decides the total. | |
| GUIDANCE | Prefer an inline python step to a kind: playbook child when the child only wraps one call: each hop measured ~9-15 s of orchestration on prod, and inlining cut a planner turn by 44%. | |
| GUIDANCE | Count slots, not steps, for concurrency: a parallel loop dispatches every item at once and max_in_flight does not throttle it, so N items need N free slots on the target pool or the rest queue. The prod user pool has 8 slots at minimum and 80 at maximum; the system pool has 4. | |
| GUIDANCE | An awaited child (return_result / return_step) or a hosted agent's playbook tool holds the parent's slot while the child needs another. Budget two slots per awaiting parent and avoid sending both to a small pool. | |
| GUIDANCE | Bound every loop and back-edge with a when: guard on an explicit counter: the server enforces no iteration cap, and each pass is a full step. | |
| GUIDANCE | Set timeout_seconds on python, shell, postgres, duckdb and rhai steps that call anything slow: those kinds have no default timeout and the worker has no per-command one. | |
| GUIDANCE | For kind: wasm, plan inside the defaults (30 s, 10e9 fuel, 1024 MiB) and expect one module at a time per worker process: concurrent wasm steps on one pod serialize. Read fuel actually spent from the worker's debug log; no metric reports it. | |
| GUIDANCE | For kind: agent, the tool-call budget (32) and child timeout (180 s) bound a hosted loop: worst case is about 32 x 180 s = 96 min of one held slot. Size max_turns and the tool list so the expected path uses a few calls, and read agent.final for the real count. | |
| GUIDANCE | Keep step results under 100 KiB when a downstream step reads them: larger results are spilled to the result store and every read becomes a fetch. | |
| GUIDANCE | Choose a pool by where the work must run (credentials, network, memory) first; then check its slot capacity against the plan's peak parallelism. Bursts above capacity on the user pool trigger KEDA scale-up, which can add node provisioning time (~60-90 s) on Autopilot. | |
| TARGET | noetl/server orchestrate-core dsl-manifest worker_runtime.agent.playbook_tools.not_durable | Orchestrator-driven resume of a hosted agent loop after a worker dies (today the step restarts from turn 1). |
Metrics
Explained in 21.5 Check the estimate.
- events_note: agent.* events come only from the hosted loop (NOETL_WORKER_AGENT_PLAYBOOK_TOOLS=true). Token usage is in call.done result data, not on agent.* events.
- server_prometheus_source: noetl/server src/metrics.rs, served at GET /metrics
- worker_prometheus_source: noetl/worker@d1c9584 src/metrics.rs, served on WORKER_METRICS_BIND, else 0.0.0.0:$PORT, else 0.0.0.0:9090
apis
- returns: started_at, completed_at and up to 2000 most recent events with created_at; no duration field (subtract); route: GET /api/executions/{id}
- returns: progress step counts only, no times; route: GET /api/executions/{id}/status
events
- fields: result.context: status, duration_ms, error, exit_code, child_execution_id; an agent step's result data carries usage {input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens}, turns, model, stop_reason; source: noetl/worker@d1c9584 src/executor/command.rs:1097-1110; noetl/[email protected] (the version noetl/worker pins) src/result.rs:62-135, src/tools/agent.rs:838-851; type: call.done
- fields: created_at on each event: the difference is the step's wall clock including slot wait after claim; source: noetl/worker@d1c9584 src/executor/command.rs:545-557, 1352-1361; type: command.started / command.completed / command.failed
- fields: turn, outcome (tool_calls | final), tool_calls [{id, name}]; source: noetl/worker@d1c9584 src/executor/agent_host.rs:226-254; type: agent.turn
- fields: turn, tool_use_id, tool, binding, playbook, child_execution_id, is_error, duration_ms, input and result previews (2 KiB); source: noetl/worker@d1c9584 src/executor/agent_host.rs:307-321; type: agent.tool_call
- fields: turns, tool_calls, child_execution_ids, duration_ms; or refused: tool_call_budget; source: noetl/worker@d1c9584 src/executor/agent_host.rs:231-240, 259-262; type: agent.final
not_available
- no per-execution or per-step duration histogram on the server
- no metric for wasm fuel consumed (debug log only)
- no metric for token usage (call.done result data only)
- no per-tool memory metric
server_prometheus
- labels: event_type; name: noetl_event_ingest_duration_seconds; type: histogram
- labels: phase; meaning: where inside event ingest the time goes; name: noetl_event_ingest_phase_seconds; type: histogram
- name: noetl_orchestrate_in_flight_executions / noetl_orchestrate_oldest_seconds; type: gauge
- labels: entry, outcome; name: noetl_execute_outcomes_total; type: counter
worker_prometheus
- labels: tool_kind; meaning: full dispatch per command: tool + case evaluation + lifecycle emits; buckets 0.01-120 s; name: noetl_worker_dispatch_duration_seconds; type: histogram
- meaning: slots in use on this worker; name: noetl_worker_concurrent_dispatches; type: gauge
- labels: phase (park | outcome); meaning: claim latency split; name: noetl_worker_command_pickup_phase_seconds; type: histogram
- labels: event_type; name: noetl_worker_event_emit_duration_seconds; type: histogram
- labels: phase (fetch | compile); meaning: wasm cold start; name: noetl_worker_plugin_load_seconds; type: histogram
- labels: limit (fuel | timeout | memory); name: noetl_worker_plugin_limit_trips_total; type: counter
- meaning: cost of spilling an over-budget result; name: noetl_worker_result_store_put_duration_seconds; type: histogram
- labels: version; meaning: which worker build answered; absence of a newer metric means that build predates it; name: noetl_worker_build_info; type: gauge
Not yet measured
Explained in 21.6 What is not yet measured.
- per-step latency of http, duckdb, postgres and mcp steps on prod
- latency of a hosted LLM call inside a real playbook step
- sustained executions per second on prod
- worker slot occupancy over time
- user-pool KEDA ramp time on the EHDB trigger, and scale-down time on prod
- catalog URI fetch latency
- unsaturated prod command-bus latency after 2026-07-30
Orchestration overhead
Explained in 21.5 Estimating and Chapter 22.
- caveat: Per-step cost varies with load and with the server build: several of these figures predate later dispatch fixes. Measure on the target cluster at the target load before committing to a budget.
- summary: Each step pays a fixed orchestration cost (command dispatch, claim, and three lifecycle event emits) on top of its work; each kind: playbook hop pays a whole child execution's worth.
measured
| Label | What | Value | Environment | Date | Source |
|---|---|---|---|---|---|
| MEASURED | fixed cost per step in the travel itinerary planner; events spaced a near-uniform 0.8-1.2 s apart | ~4.5 s per step | prod | 2026-08 | noetl/travel wiki playbook-itinerary-planner#latency |
| MEASURED | share of a planner turn that is orchestration (63 events, ~15-17 s of work in a ~76-107 s turn) | ~82% | prod | 2026-08 | noetl/travel wiki playbook-itinerary-planner#latency |
| MEASURED | 10-hop probe playbook: share of a turn in two command-dispatch gaps per hop (~510 ms p50 each) | 79% | prod | 2026-08-18 | noetl/ai-meta wiki Sessions-Log 2026-08-18 |
| MEASURED | server event ingest per emit: command.started / command.completed vs call.done (three emits per hop) | ~336 ms / ~1021 ms on prod, ~40 ms on kind | prod and kind | noetl/server src/metrics.rs (doc comment on noetl_event_ingest_phase_seconds) | |
| MEASURED | prod smoke turns through the gateway: travel planner turn / ranch concierge turn | 17.0-21.2 s / 6.4-7.0 s | prod | 2026-11-04 | noetl/ai-meta wiki Sessions-Log 2026-11-04 |
| MEASURED | first drive of a fresh system-pool pod after a roll (state builder replays the feed) | drives stall ~7-10 min | prod | 2026-11-03 | noetl/ai-meta wiki Sessions-Log 2026-11-03 (early) |
| MEASURED | command-bus writer restart (lease election) | failover window 21 s; plan for a 20-60 s write outage | prod | 2026-11-04 | noetl/worker wiki cmdbus-writer-tier-service |
Step kinds
Explained in 21.2 Per-step-kind costs.
Per-kind execution, slot and timeout profiles are in Appendix B.