Skip to content
cccskills
FreePublished on GitHub

capacity-planning

容量规划时使用。适用于扩缩容决策、大促准备、成本优化、资源预测。融合 Google SRE Capacity Planning + 负载测试 + 成本模型。

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md2.0 KB
  • templates/capacity-plan-template.md767 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

容量规划(Capacity Planning)

适用场景

  • 大促 / 活动前容量评估
  • 日常扩缩容决策
  • 成本优化
  • 新服务资源预估
  • 年度容量预算

核心原则

1. 数据驱动
   基于历史指标预测,不靠猜

2. Buffer 预留
   目标利用率 60~70%,不是 100%

3. 瓶颈优先
   找最先压垮的资源

4. 成本感知
   扩容有成本,不是越多越好

5. 定期评审
   每月 / 每季度回顾

容量评估公式

所需实例 = 峰值 QPS / 单实例 QPS × Buffer

示例:
  峰值 QPS = 10000
  单实例 QPS = 500(压测得出)
  Buffer = 1.5(50% 余量)
  
  实例数 = 10000 / 500 × 1.5 = 30

按 N+2 容灾:
  实际部署 = 32

工作流程

1. 收集当前指标
   - CPU / Memory / QPS / 连接数
   - 历史峰值
   - 增长趋势

2. 预测未来负载
   - 线性增长 / 季节性
   - 大促倍数

3. 压测单实例容量
   - k6 / JMeter
   - 找拐点

4. 计算所需资源

5. 成本评估

6. 扩缩容方案
   - 手动 / HPA / KEDA

7. 验证(压测)

8. 文档化

配套模板

  • templates/capacity-plan-template.md — 容量评估 + 预测 + 成本 + 方案

质量自检

□ 基于数据(不靠猜)
□ 压测验证
□ Buffer 预留(50%+)
□ 成本评估
□ 扩缩容方案
□ 定期评审
□ 大促提前准备
□ 瓶颈识别

常见坑

  1. 不压测就预估——数字不可信
  2. 利用率 100%——没有 buffer
  3. 只看 CPU——可能瓶颈在连接池
  4. 不考虑成本——过度扩容
  5. 不定期评审——资源浪费

与其他 skill 的协作

上游:
  devops-engineer monitoring-alerting → 指标数据
  
下游:
  devops-engineer kubernetes-orchestration → HPA 配置
  devops-engineer infrastructure-as-code → 资源申请

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A/B 测试设计与分析时使用。适用于产品实验、功能验证、转化率优化。融合假设驱动 + 样本量计算 + 置信度判断。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

上线前业务方/产品方验收时使用。适用于功能交付确认、UAT、发布会签。融合 BDD Given-When-Then、Specification by Example、ATDD。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

设计无障碍可访问的界面时使用。适用于满足 WCAG 标准、键盘导航、屏幕阅读器支持。优先使用 WCAG 2.2 AA 级标准 + 键盘 + 焦点 + 对比度 + ARIA。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

实现可访问性(无障碍)时使用。覆盖 WCAG 2.2 AA / ARIA / 键盘导航 / 屏幕阅读器 / 颜色对比 / 焦点管理。融合 React Aria / Radix UI / Headless UI 实践 + axe-core 自动化测试。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

AI 模型部署时使用。适用于推理服务 / GPU / TensorRT / 监控 / 扩缩容。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

数据分析报告输出时使用。适用于业务分析报告、周报、专项分析、决策支持。融合洞察 + 建议 + 行动项。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow53Updated May 19, 2026

See all skills by zhaoxuya520

Report a problem with this skill