Autoscaling Policy - CI/CD用語集の定義
autoscaling policyとは、queue depth、CPU使用率、カスタムメトリクスなどのシグナルに基づいて、いつrunnerを追加または削除するかを決定するルールセットです。scale-upとscale-downのしきい値、cooldown期間、インスタンス数の最小値と最大値を定義します。
queue depthによるスケーリング
CIのrunnerフリートにとって最も有用なシグナルは、キューに入った(保留中の)jobの数です。policyはN個のキュー内jobごとに1つのrunnerを追加し、runnerがcooldownウィンドウの間アイドル状態が続いた後にscale downするといった動作をします。CUだけでスケールするのは不十分な代理指標です。jobを待っているrunnerは、作業がキューに入っていてもアイドル状態だからです。
スラッシングを避ける
cooldown期間とヒステリシス(上昇と下降で異なるしきい値)は、boot時間とコストを浪費する追加/削除の急激なサイクルを防ぎます。最小値をゼロに設定すると、閑散時間帯のscale-to-zeroが有効になります。
関連ガイド
Queue Depth - CI/CD Glossary DefinitionQueue Depth: Queue depth is the number of jobs waiting for a free runner at a given moment. It is the primary…
Scale-to-Zero - CI/CD Glossary DefinitionScale-to-Zero: Scale-to-zero is an autoscaling behavior that removes every runner when there is no work, so y…
Runner Concurrency - CI/CD Glossary DefinitionRunner Concurrency: Runner concurrency is the number of jobs that can execute in parallel across your runner…