Dynamic Thresholding
Skala resource aktif berdasarkan load traffic, queue depth, dan SLA target.
Documentation / Sovereign Autoscale
Sistem scaling cerdas untuk memastikan kapasitas selalu sesuai kebutuhan operasional, tanpa pemborosan resource.
Skala resource aktif berdasarkan load traffic, queue depth, dan SLA target.
Batas minimum-maksimum node dijaga agar stabilitas dan cost control tetap seimbang.
Provision, warmup, handover, dan drain node dikelola tanpa downtime operasional.
Endpoint autoscale hanya dapat diakses oleh role superadmin atau service account dengan scope khusus. Semua operasi scale wajib menyertakan request signature untuk audit trail.
# Required Headers
Authorization: Bearer <service_jwt>
X-Tenant-ID: mitra_abc123
X-Request-ID: uuid-v4
X-Signature: hmac_sha256(payload, secret)
# Required Scopes
autoscale:read — baca telemetry & policy
autoscale:write — update policy & trigger scale
autoscale:override — bypass guardrail (superadmin only)
/api/autoscale/policyAmbil konfigurasi policy autoscale aktif untuk tenant.
{
"tenant_id": "mitra_abc123",
"min_nodes": 2,
"max_nodes": 12,
"target_cpu_pct": 65,
"target_queue_depth": 120,
"scale_up_step": 2,
"scale_down_step": 1,
"cooldown_seconds": 300,
"health_gate_min_score": 85,
"updated_at": "2026-05-19T00:00:00Z"
}
/api/autoscale/policyUpdate policy autoscale tenant.
{
"min_nodes": 3,
"max_nodes": 20,
"target_cpu_pct": 70,
"target_queue_depth": 180,
"cooldown_seconds": 240,
"health_gate_min_score": 88
}
/api/autoscale/telemetryAmbil snapshot telemetry cluster untuk decisioning dan monitoring.
{
"timestamp": "2026-05-19T00:05:00Z",
"cluster": {
"active_nodes": 6,
"avg_cpu_pct": 58,
"avg_memory_pct": 61,
"queue_depth": 94,
"req_per_sec": 132
},
"nodes": [
{ "id": "node-sg-01", "cpu": 62, "memory": 60, "health": 92 },
{ "id": "node-jkt-01", "cpu": 55, "memory": 59, "health": 95 }
]
}
/api/autoscale/simulateSimulasikan keputusan autoscale tanpa melakukan perubahan nyata (dry-run decision engine).
{
"input": {
"active_nodes": 4,
"avg_cpu_pct": 83,
"queue_depth": 260
}
}
# Response
{ "decision": "scale_up", "add_nodes": 2, "confidence": 0.93 }
/api/autoscale/actionTrigger aksi manual scale up/down dengan audit log.
{
"action": "scale_up" | "scale_down",
"count": 2,
"reason": "traffic_spike" | "cost_optimization" | "manual_override",
"override_guardrail": false
}
1. Jika avg_cpu_pct > target_cpu_pct selama 3 interval berturut-turut, trigger scale up.
2. Jika queue_depth > target_queue_depth selama 2 interval, trigger scale up prioritas tinggi.
3. Jika avg_cpu_pct < target_cpu_pct - 20% selama 15 menit, evaluasi scale down.
4. Scale down hanya dilakukan jika node health score semua node > 90 dan tidak ada incident aktif.
5. Semua aksi scale diblok selama cooldown window aktif untuk mencegah flapping.
| Endpoint Group | Limit | Window | Notes |
|---|---|---|---|
| GET /policy, /telemetry | 120 req | 1 menit | Read-heavy safe |
| PUT /policy | 30 req | 1 menit | Config mutation |
| POST /action, /simulate | 20 req | 1 menit | Scale decision control |
| Code | Meaning | Resolution |
|---|---|---|
| AS-001 | Scale operation blocked by cooldown window | Tunggu cooldown selesai atau override via superadmin |
| AS-002 | Node provisioning failed | Cek quota provider dan network bootstrap script |
| AS-003 | Health gate failed after scale-up | Node baru gagal health check, auto-drain aktif |
| AS-004 | Scale-down prevented by minimum capacity policy | Turunkan min_nodes policy atau tingkatkan drain timeout |
| AS-005 | Telemetry stale, decision engine paused | Periksa collector pipeline dan heartbeat agent |
| Metric | Unit | Deskripsi |
|---|---|---|
| as.scale.events_total | count | Total event scale up/down |
| as.scale.up.duration_ms | ms | Durasi rata-rata scale-up |
| as.scale.down.duration_ms | ms | Durasi rata-rata scale-down |
| as.node.health_score | 0-100 | Skor kesehatan node agregat |
| as.node.active_total | count | Jumlah node aktif saat ini |
| as.queue.depth | count | Kedalaman queue request |
| as.policy.block_count | count/hr | Jumlah scale event diblok policy |
| as.cost.estimate_hourly | currency/hr | Estimasi biaya per jam |
Optimization Tip
Aktifkan cooldown window dan anomaly dampener untuk mencegah flapping saat beban traffic berubah cepat.