mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-11 10:23:17 +08:00
This introduces a new demo (`demos/autoscaled-workerpool`) demonstrating how to dynamically autoscale a WorkerPool using HPA + `prometheus-adapter` on a local Kind cluster. As mentioned in https://github.com/agent-substrate/substrate/issues/198, this approach may be too slow for some use cases, but this is a good first milestone. Plus, there are some limitations with scaling workerpools that still need to be addressed, for example: - Scale-down can strand paused actors. When a worker pod is removed, a local-snapshot paused actor keeps its node pin pointing at a node that may no longer have (free) worker pods. - Scale-up gives no locality guarantee: If there are multiple local-snapshot paused actors that can't resume because no worker pods are available on their node, upscaling will not unblock them: the added capacity can land anywhere, so the pool can grow without ever placing a worker where a stranded actor needs it. - Scale-down picks victims blind to actor assignment (can kill busy pods). - [x] Tests pass: n/a - [x] Appropriate changes to documentation are included in the PR