Show & Tell: Designing ASI:BUILD's Production Stack — Docker Compose, Kubernetes Helm, and Prometheus Metrics #177
web3guru888
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Phase 4.3 production deployment is underway. This thread walks through the production stack design — from
docker compose upto a Kubernetes Helm chart with auto-scaling on mesh queue depth.What's in the stack
One
docker compose upstarts all three services. Theasi-buildcontainer waits for Memgraph and Redis health checks before starting the CognitiveCycle loop.Health endpoint design
Three endpoints cover the standard K8s probe pattern:
GET /healthGET /readyGET /metrics/healthreads directly fromCycleFaultSummary— if Safety or Blackboard is CRITICAL, the pod is marked unhealthy and K8s will restart it./readyprevents traffic during the startup phase when modules are still initializing. A fresh pod needs ~15s before its first tick.Prometheus metrics
Twelve metrics cover the full cognitive pipeline:
CognitiveCycle:
asi_cycle_ticks_total— monotonically increasing tick counterasi_cycle_tick_duration_ms— histogram (buckets: 10/25/50/100/150/200/500ms)asi_cycle_budget_violations_total— ticks exceeding BUDGET_MS (target: <1%)asi_cycle_faults_total{module_name, severity}— per-module fault counterAgentMesh / MeshTaskQueue:
asi_mesh_tasks_enqueued_total{priority}— tasks entering queueasi_mesh_tasks_completed_total— tasks successfully aggregatedasi_mesh_tasks_failed_total— dead-letter arrivalsasi_mesh_queue_depth— current queue depth (Gauge, used for HPA)asi_mesh_active_agents— agents in HEALTHY stateCognitive Blackboard:
asi_blackboard_writes_total— all Blackboard writesasi_blackboard_live_entries— non-expired entries (Gauge)Kubernetes auto-scaling
The
asi_mesh_queue_depthGauge is the right HPA signal. If the queue is filling up, the CognitiveCycle is producing tasks faster than agents can drain them — add replicas.Multi-replica deployments share Redis for
MeshTaskQueue— each pod is stateless with respect to task dispatch. The Cognitive Blackboard remains in-process (each pod has its own ephemeral Blackboard). This is acceptable: the Blackboard is a per-process working memory, not a shared database.Open questions
MODULES_ENABLEDbe changeable at runtime via aPUT /configendpoint, or restart-only?Related
All reactions