agent-substrate / agent-substrate/substrate

Identify what metrics we should use for HPA-based workerpool autoscaling

未关闭
#671 4 条评论 0 个 reaction 已指派 1 人 已被 @shrutiyam-glitch 认领 在 GitHub 查看
area/observability area/scheduling kind/design kind/feature
主要语言
Go
星标
1.8k
派生
316
平均合并
2 天 43 分钟
30 天内合并 PR
287

描述

Today, the HPA demo is configured to autoscale a workerpool based on `ate.workerpool.workers` metric: https://github.com/agent-substrate/substrate/blob/e70e1f21f85e20844548a521231868bacefd55d4/demos/autoscaled-workerpool/prometheus-adapter.yaml#L47-L57

`ate.workerpool.workers` counts workers by state, so it's clamped by capacity: eg, when a pool of 5 is fully assigned it reports 5, whether one actor is waiting or a thousand are.

Scaling on this metric alone may be fine for the steady state, but we'll be blind to incoming demand that greatly exceeds the pool capacity.

`atenet.router.parking.active` is a demand sign, but it doesn't know what specific workerpool the demand is for . A control plane equivalent metric doesn't exist.

One option is to autoscale on a new `ate.workerpool.demand` (filtered on `pool_exhausted` blocked reason) metric that counts actors that want a slot:

| attribute | values |
| --- | --- |
| `ate.workerpool.name` | pool name; empty when nothing in the fleet was eligible |
| `ate.sandbox.class` | `gvisor` / `microvm` |
| `ate.demand.state` | `resident` (holding a slot now) / `blocked` (rejected/still retrying) |
| `ate.blocked.reason` | `none`, `pool_exhausted`, `node_locality`, `no_eligible_pool`, `unknown` |

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。