The library documents itself · Concurrency & distribution
stzAppCluster
48 own methods · 1 forms written with extensions, listed under their method
the source: base/cluster/stzAppCluster.ring(opens in a new tab) · All classes · The area reference: Concurrency & distribution
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
No method of this class is run on this page: the class reaches files, the network, processes, the clock, chance or sound, and an example run here would only be an example of its effects. Each method carries the explanation the library gives of itself.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
AddProfile
declaring the fleet composition ------------------------------------ Declare nWorkers processes of a profile (capability tag + caps). One @aFleet row per worker is created NOW (port assigned at Start), so FleetSize/WorkersOf are correct before and after launch.QCSXTZZZIBWU
SetMaxTries
(no comment in the source: the name reads as a sentence) set max triesno extension
SetCircuitBreaker
Circuit breaker: after nThreshold consecutive failures a worker's circuit OPENS (it is skipped for nCooldownMs, then half-open: one probe re-closes on success or re-opens on failure).no extension
SetRateLimit
Rate limit a facet at the front door: nRatePerSec sustained with a bucket of nBurst (the largest instantaneous burst absorbed). A facet with no SetRateLimit is UNLIMITED. Requests over the limit are shed with a -429 status before any worker is touched.no extension
RegisterExternalWorker
Register a PRE-EXISTING worker (e.g. a remote/static host) into a facet's pool -- it participates in routing, failover and health like a spawned worker. host:port endpoint.no extension
WithFacet
THE GENERAL FORM: specialize workers along ANY facet in THIS cluster's catalog (not just the doc's four). Capabilities, provenance and any external tool are taken from the pool's own catalog (instance-scoped, customizable via CatalogQ()/DefineFacet). oC.WithFacet(:graph, 2).WithFacet(:knowledge, 2).WithFacet(:neural, 1)no extension
CatalogQ
The cluster's facet catalog (instance-scoped -- customize per deployment: DefineFacet/DefinePolyglotFacet/Drop before WithFacet).no extension
WithNLP
Sugar for the doc's four (each just a WithFacet over the catalog).no extension
WithMath
Same as WithFacet: THE GENERAL FORM: specialize workers along ANY facet in THIS cluster's catalog (not just the doc's four). Capabilities, provenance and any external tool are taken from the pool's own catalog (instance-scoped, customizable via CatalogQ()/DefineFacet). oC.WithFacet(:graph, 2).WithFacet(:knowledge, 2).WithFacet(:neural, 1)no extension
WithSearch
Same as WithFacet: THE GENERAL FORM: specialize workers along ANY facet in THIS cluster's catalog (not just the doc's four). Capabilities, provenance and any external tool are taken from the pool's own catalog (instance-scoped, customizable via CatalogQ()/DefineFacet). oC.WithFacet(:graph, 2).WithFacet(:knowledge, 2).WithFacet(:neural, 1)no extension
WithVision
Same as WithFacet: THE GENERAL FORM: specialize workers along ANY facet in THIS cluster's catalog (not just the doc's four). Capabilities, provenance and any external tool are taken from the pool's own catalog (instance-scoped, customizable via CatalogQ()/DefineFacet). oC.WithFacet(:graph, 2).WithFacet(:knowledge, 2).WithFacet(:neural, 1)no extension
SetWorkerTTL
(no comment in the source: the name reads as a sentence) set worker ttlno extension
SetBasePort
(no comment in the source: the name reads as a sentence) set base portno extension
SetRingExe
(no comment in the source: the name reads as a sentence) set ring exeno extension
Start
launching the fleetno extension
WaitReady
Poll every worker's /health until it answers 200 (workers need a moment to load stzBase + bind). Returns the number now ready.no extension
Route
routing: RETRY-WITH-FAILOVER + per-worker CIRCUIT BREAKER ----------- Proxy to a healthy worker of pcTag. On a failed attempt (transport error or non-2xx), FAIL OVER to the next healthy worker, up to SetMaxTries. A worker that fails SetCircuitBreaker consecutive times has its circuit OPENED (skipped for the cooldown, then half-open). A success resets/closes its circuit. Path is SSRF/CRLF-validated first.no extension
RouteLastStatus
(no comment in the source: the name reads as a sentence) route last statusno extension
Why
(no comment in the source: the name reads as a sentence) whyno extension
TelemetryQ
observability (latency percentiles + trace ids)no extension
LastTraceId
The trace id assigned to the most recent Route (correlates the front host's record with the worker's _trace on the wire).no extension
LatencyP50
Tail-aware latency for a facet (ms; the engine histogram bucket bound).no extension
LatencyP90
(no comment in the source: the name reads as a sentence) latency p90no extension
LatencyP99
(no comment in the source: the name reads as a sentence) latency p99no extension
LatencyStats
(no comment in the source: the name reads as a sentence) latency statsno extension
RecentTraces
The last n request records: [ id, facet, endpoint, status, durMs, attempts ].no extension
LimiterQ
rate limiting (front-door admission)no extension
RateLimitedCount
How many requests this facet has shed for exceeding its rate limit.no extension
TokensAvailable
Tokens left in a facet's bucket (-1 = unlimited / no limit configured).no extension
CircuitOpenCount
(no comment in the source: the name reads as a sentence) circuit open countno extension
FleetSize
introspectionno extension
ReadyCount
(no comment in the source: the name reads as a sentence) ready countno extension
WorkersOf
(no comment in the source: the name reads as a sentence) workers ofno extension
Ports
(no comment in the source: the name reads as a sentence) portsno extension
PoolQ
(no comment in the source: the name reads as a sentence) pool qno extension
ReactorQ
(no comment in the source: the name reads as a sentence) reactor qno extension
ClassifierQ
R8.2 smart routing (classify -> route) ----------------------------- A request classifier bound to THIS cluster's facet catalog (created lazily, after facets are declared).no extension
RouteRequest
Classify a request to a facet (R8.2), then proxy it to a worker of that facet (R8.3). Returns the response body; "" (with negative RouteLastStatus) when the request is undecidable or has no worker.no extension
HealthCheck
R8.4 health + elastic scale (the supervision surface) -------------- Re-probe every worker's /health and refresh its ready flag. A worker that stops answering (crashed, exited its TTL) flips to NOT ready. Returns the number ready now.no extension
DeadCount
Workers that were launched but are not answering (crashed / expired).no extension
ScaleUp
Add ONE worker of a profile (elastic scale-up). Spawns a new process on a fresh port; call WaitReady()/HealthCheck() to see it come up. Returns the new port.no extension
ScaleDown
GRACEFUL drain-down: mark one ready worker of a profile DRAINING -- routing stops immediately (it finishes in-flight work), and the process self-exits on its TTL. Returns the drained port, or 0 if there is nothing to drain. (Forced kill of a hung worker is a small future engine add; drain is the graceful path.)no extension
RestartDead
Respawn every dead worker in place (health-driven self-healing). Returns the number restarted.no extension
ForceKill
forced kill + orphan cleanup (the forceful sibling of drain) -------- Force-kill EVERY spawned worker of a facet (SIGKILL). The forceful counterpart to ScaleDown's graceful drain: use it on a WEDGED worker that neither answers health nor self-exits on its TTL. Marks each not ready and returns how many were actually killed. External workers (RegisterExternalWorker, jobId 0) are NOT ours to kill and are skipped.no extension
KilledCount
Total workers force-killed over the cluster's life (a hung-worker / orphan-cleanup signal for the health console).no extension
FleetMetrics
A per-profile metrics snapshot the supervisor reads (REAL counts).no extension
Stop
teardown ----------------------------------------------------------- R8.3: workers self-terminate on their TTL. Graceful drain / kill / health-restart / autoscale is R8.4 (stzAgentHost supervision).no extension

