configuring-auto-scaling-policies
Configure use when you need to work with auto-scaling. This skill provides auto-scaling configuration with comprehensive guidance and automation. Trigger with phrases like "configure auto-scaling", "set up elastic scaling", or "implement scaling".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- configuring-auto-scaling-policies
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Configure use when you need to work with auto-scaling. This skill provides auto-scaling configuration with comprehensive guidance and automation. Trigger with phrases like "configure auto-scaling", "set up elastic scaling", or "implement scaling".
- allowed-tools
- Read, Write, Edit, Grep, Glob, Bash(cmd:*)
- compatible-with
- claude-code, codex, openclaw
02 资源文件 7
- 资产文件assets/config_template.yaml3.2 KB
- 资产文件assets/example_aws_scaling_policy.json2.1 KB
- 资产文件assets/example_hpa.yaml2.3 KB
- 资产文件assets/README.md369 B
- 参考文档references/README.md69 B
- 脚本scripts/generate_config.py3.6 KB
- 脚本scripts/README.md423 B
03 SKILL.md 正文
Configuring Auto-Scaling Policies
Overview
Configure auto-scaling policies for cloud workloads across AWS Auto Scaling Groups, GCP Managed Instance Groups, Azure VMSS, and Kubernetes Horizontal Pod Autoscaler (HPA). Generate scaling configurations based on CPU, memory, request rate, or custom metrics with appropriate thresholds, cooldown periods, and scale-in protection.
Prerequisites
- Cloud provider CLI installed and authenticated (
aws,gcloud, oraz) - For Kubernetes HPA:
kubectlconfigured with cluster access and metrics-server deployed - Baseline performance data for the target workload (average CPU, memory, request rate)
- Understanding of traffic patterns (steady, bursty, scheduled)
- IAM permissions to create/modify scaling policies and CloudWatch/Stackdriver alarms
Instructions
- Identify the scaling target: EC2 Auto Scaling Group, GCP MIG, Azure VMSS, or Kubernetes Deployment
- Analyze current workload metrics to establish baseline utilization and peak patterns
- Define scaling boundaries: minimum instances/pods, maximum instances/pods, desired count
- Select scaling metric(s): CPU utilization, memory, request count, queue depth, or custom metrics
- Set target thresholds: scale-out trigger (e.g., CPU > 70%), scale-in trigger (e.g., CPU < 30%)
- Configure cooldown periods to prevent flapping (typically 300s scale-out, 600s scale-in)
- Add scale-in protection for stateful workloads or leader nodes if needed
- Generate the scaling policy configuration in the appropriate format (Terraform, YAML, or CLI commands)
- Validate by simulating load and confirming scaling events fire correctly
Output
- Terraform HCL for AWS ASG scaling policies with CloudWatch alarms
- Kubernetes HPA manifests (YAML) with resource or custom metric targets
- GCP autoscaler configurations for Managed Instance Groups
- Scaling policy JSON/YAML for Azure VMSS
- CloudWatch or Stackdriver alarm definitions tied to scaling actions
Error Handling
| Error | Cause | Solution |
|---|---|---|
No scaling activity despite high load |
Metric not reaching threshold or cooldown active | Verify metric source in CloudWatch/Stackdriver; check cooldown timer with describe-scaling-activities |
Scaling too aggressively (flapping) |
Cooldown too short or threshold too sensitive | Increase cooldown period and widen the gap between scale-out and scale-in thresholds |
Max capacity reached |
Instance/pod limit hit during traffic spike | Raise max_size or implement request queuing as a backpressure mechanism |
HPA unable to compute replica count |
Metrics server not deployed or metric unavailable | Install metrics-server and verify kubectl top pods returns data |
FailedScaleUp: insufficient capacity |
Cloud provider out of capacity in selected AZ/region | Add multiple AZs to the ASG or use mixed instance types with allocation strategy |
Examples
- "Configure an AWS ASG with target tracking at 65% CPU, min 2 / max 20 instances, and 5-minute cooldown."
- "Create a Kubernetes HPA for a deployment that scales from 3 to 50 pods based on requests-per-second using a custom Prometheus metric."
- "Set up scheduled scaling for a GCP MIG: scale to 10 instances at 8am UTC and back to 2 at 10pm."
Resources
- AWS Auto Scaling: https://docs.aws.amazon.com/autoscaling/ec2/userguide/
- Kubernetes HPA: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
- GCP Autoscaler: https://cloud.google.com/compute/docs/autoscaler
- Azure VMSS Autoscale: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-autoscale-overview
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.