ARCHOS 525 BLUEPRINT · /d/dgm_k8s-autoscaling-hpa-keda-node-provisioning
Autoscaling on Kubernetes (queue depth, replicas and spot nodes)
13 COMPONENTS · 12 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_k8s-autoscaling-hpa-keda-node-provisioning) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_k8s-autoscaling-hpa-keda-node-provisioning)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_k8s-autoscaling-hpa-keda-node-provisioning" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Autoscaling on Kubernetes (queue depth, replicas and spot nodes) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("API Client")]
rs_1[("Resource server")]
gw_2["API gateway"]
queue_3[("Message queue")]
workers_4["Competing consumers"]
dlq_5[("Dead-letter queue (DLQ)")]
as_6["Autoscaler"]
cluster_7[("Kubernetes cluster")]
nodeas_8["Autoscaler"]
secrets_9[("Secrets manager")]
tsdb_10[("Time-series database (TSDB)")]
alerting_11[("Alerting")]
capacity_12["Capacity Estimate"]
client_0 -->|"1. Calls with a JWT · HTTPS"| gw_2
gw_2 -->|"2. Enqueues job · HTTPS"| queue_3
queue_3 -.->|"3a. Delivers job · HTTPS"| workers_4
queue_3 -.->|"3b. Parks jobs · HTTPS"| dlq_5
workers_4 -->|"4. Sends result · HTTPS"| rs_1
as_6 -->|"Polls depth · HTTPS"| queue_3
as_6 -->|"Sets replicas · HTTPS"| cluster_7
cluster_7 -->|"Reconciles Pods · HTTPS"| workers_4
nodeas_8 -->|"Adds nodes · HTTPS"| cluster_7
secrets_9 -->|"Supplies credential · HTTPS"| nodeas_8
as_6 -->|"Exports (OTLP) · OTLP"| tsdb_10
tsdb_10 -->|"Notifies · HTTP"| alerting_11COMPONENT STACK (12)
- API ClientSTATEFULSubmits jobs from an untrusted network
- Resource serverSTATEFULDownstream API that receives each result
- API gatewaySTATELESSChecks the JWT; rejects when the queue is full
- Message queueSTATEFULHolds jobs; hands each to one worker
- Competing consumersSTATELESSPods that pull jobs; safe to run twice
- Dead-letter queue (DLQ)STATEFULParks jobs that keep failing
- AutoscalerSTATELESSSets the worker count from queue depth
- Kubernetes clusterSTATEFULReconciles Pods to the worker count
- AutoscalerSTATELESSAdds spot nodes across pools for Pending Pods
- Secrets managerSTATEFULHolds the cloud credential for creating nodes
- Time-series database (TSDB)STATEFULStores queue depth, Pending Pods, job age
- AlertingSTATEFULPages on-call when jobs age or the DLQ grows
REQUEST & DATA FLOW (12)
- API Client → API gateway (Calls with a JWT)[HTTPS]
- API gateway → Message queue (Enqueues job)[HTTPS]
- Message queue → Competing consumers (Delivers job)[HTTPS]
- Message queue → Dead-letter queue (DLQ) (Parks jobs)[HTTPS]
- Competing consumers → Resource server (Sends result)[HTTPS]
- Autoscaler → Message queue (Polls depth)[HTTPS]
- Autoscaler → Kubernetes cluster (Sets replicas)[HTTPS]
- Kubernetes cluster → Competing consumers (Reconciles Pods)[HTTPS]
- Autoscaler → Kubernetes cluster (Adds nodes)[HTTPS]
- Secrets manager → Autoscaler (Supplies credential)[HTTPS]
- Autoscaler → Time-series database (TSDB) (Exports (OTLP))[OTLP]
- Time-series database (TSDB) → Alerting (Notifies)[HTTP]