Appendix D: The Resource Model, Annotated

REAL

Generated

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.

Read this first

  • 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.

LabelMeaning
DEFAULTa code default (env var + value); a deployment may override it
DEPLOYEDread off the production cluster on as_of; configuration, not code
GUIDANCEa planning rule derived from the figures; not a measurement
MEASUREDobserved on a cluster or harness; read environment/date/source before reusing it
NOT_YET_MEASUREDa real question with no number; do not invent one
TARGETa goal or budget; not a measurement

Limits

Explained in 21.3 Limits.

LabelWhatValueSourceNoteCostCostsDeployedEnvGatesParallelUnit
DEFAULT10000000000noetl/worker@d1c9584 src/plugin.rs:410 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit}NOETL_WASM_FUELfuel units per invocation
DEFAULT30000noetl/worker@d1c9584 src/plugin.rs:4410 ms deadline granularityNOETL_WASM_TIMEOUT_MSms wall clock per invocation
DEFAULT1024noetl/worker@d1c9584 src/plugin.rs:47NOETL_WASM_MAX_MEMORY_MBMiB linear memory
DEFAULT32noetl/worker@d1c9584 src/executor/agent_host.rs:50positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budgetNOETL_AGENT_MAX_TOOL_CALLStool calls per agent step
DEFAULT180noetl/worker@d1c9584 src/executor/agent_host.rs:51NOETL_AGENT_TOOL_TIMEOUT_SECSs per playbook-bound child
DEFAULT4noetl/worker@d1c9584 src/config.rs:115-118WORKER_MAX_CONCURRENTslots per worker process
DEFAULT102400noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetchNOETL_EVENT_RESULT_CONTEXT_MAX_BYTESbytes
DEFAULT524288noetl/server src/config/app.rs:242-246a command context above it is offloaded as a context_refNOETL_COMMAND_CONTEXT_MAX_BYTESbytes
DEFAULTrequest body limit on /api/execute and /api/events2097152noetl/server src/main.rs:640-645 (the axum default; no explicit layer)bytes
DEFAULTGET /api/executions/{id} events returned2000noetl/server src/services/execution.rs:694most recent events
DEFAULT120noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140extra retry window for event emits during a server outage; the slot stays heldNOETL_EVENT_EMIT_OUTAGE_BUDGET_SECSs
DEFAULT150noetl/worker@d1c9584 src/worker.rs:1139on SIGTERM a worker finishes in-flight commands within this budgetNOETL_WORKER_DRAIN_TIMEOUT_SECSs
DEFAULTcatalog 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 fetchlabel: 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
DEFAULTversion pinning and hot reloadoff. 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 @latestnoetl/server orchestrate-core/src/catalog.rs:338-353, 406-416, 505-529; src/handlers/execute.rs:687-699pinning 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 prodNOETL_CATALOG_PINNING, NOETL_CATALOG_HOT_RELOAD
DEFAULTloops 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-780every iteration and every back-edge pass is a full step: it pays the per-step orchestration cost below and holds a slotloop.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
DEFAULT225noetl/server src/config/app.rs:702-726how long a stuck execution is re-driven before the server stopsNOETL_RECONCILE_MAX_NOOPSconsecutive 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

LabelWhatValueEnvironmentDateSource
MEASUREDuser pool under 200 real executions (200/200 completed)replicas 2 -> 4 -> 8 -> 16 -> 20 -> 2prod2026-07-31noetl/ai-meta wiki Home (#210)
NOT_YET_MEASUREDtime for the user pool to ramp under load on the EHDB triggernone
MEASUREDGKE Autopilot node provisioning when a scale-up needs a new node~60-90 sprodnoetl/ai-meta playbooks/load-test/README.md

measured

LabelWhatValueEnvironmentDateSourceNote
MEASUREDcommand.issued -> command.claimed, pool not saturatedp50 138.5 / p95 156.4 / p99 181.0 ms (n=60)prod2026-07-30noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)
MEASUREDsame, with 90 commands offered in 1.2 s against 8 slots (2 replicas x 4)p50 2123 / p99 3735 msprod2026-07-30noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)this measures the pool queue, not the bus
MEASUREDPOST /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 timeoutsprod2026-09-03noetl/ai-meta wiki Umbrella-Request-Latencyp95 at c=1 rests on single samples
NOT_YET_MEASUREDsustained executions per second the platform can completenone

pools

LabelSourceCapacity_slotsCpuMemoryPoolReplicasSlots_per_replica
DEPLOYEDprod cluster read, as_of8 at min, 80 at max250m request / 2 limit256Mi request / 768Mi limitworker-rust-pool (user pool, Deployment noetl-worker-rust)2 (KEDA 2-20)4
DEPLOYEDprod cluster read, as_of4750m request / 2 limit3Gi / 3Giworker-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.

LabelSourceRule
GUIDANCEEstimate 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.
GUIDANCEPrefer 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%.
GUIDANCECount 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.
GUIDANCEAn 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.
GUIDANCEBound 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.
GUIDANCESet 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.
GUIDANCEFor 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.
GUIDANCEFor 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.
GUIDANCEKeep 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.
GUIDANCEChoose 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.
TARGETnoetl/server orchestrate-core dsl-manifest worker_runtime.agent.playbook_tools.not_durableOrchestrator-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

LabelWhatValueEnvironmentDateSource
MEASUREDfixed cost per step in the travel itinerary planner; events spaced a near-uniform 0.8-1.2 s apart~4.5 s per stepprod2026-08noetl/travel wiki playbook-itinerary-planner#latency
MEASUREDshare of a planner turn that is orchestration (63 events, ~15-17 s of work in a ~76-107 s turn)~82%prod2026-08noetl/travel wiki playbook-itinerary-planner#latency
MEASURED10-hop probe playbook: share of a turn in two command-dispatch gaps per hop (~510 ms p50 each)79%prod2026-08-18noetl/ai-meta wiki Sessions-Log 2026-08-18
MEASUREDserver event ingest per emit: command.started / command.completed vs call.done (three emits per hop)~336 ms / ~1021 ms on prod, ~40 ms on kindprod and kindnoetl/server src/metrics.rs (doc comment on noetl_event_ingest_phase_seconds)
MEASUREDprod smoke turns through the gateway: travel planner turn / ranch concierge turn17.0-21.2 s / 6.4-7.0 sprod2026-11-04noetl/ai-meta wiki Sessions-Log 2026-11-04
MEASUREDfirst drive of a fresh system-pool pod after a roll (state builder replays the feed)drives stall ~7-10 minprod2026-11-03noetl/ai-meta wiki Sessions-Log 2026-11-03 (early)
MEASUREDcommand-bus writer restart (lease election)failover window 21 s; plan for a 20-60 s write outageprod2026-11-04noetl/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.