用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill infrastructure-sizing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | infrastructure-sizing |
| description | Right-sizing infrastructure — capability tiers, scaling triggers, anti-overengineering. |
Match infrastructure to measured need, not to anticipated need. Every capability added before its trigger fires is paid for in cost, deploy time, debugging surface, and onboarding difficulty — permanently.
Start small, measure, scale.
Tiers describe capabilities, not products. Read the project's existing stack and pick the tier; the platform that delivers that tier is whatever the project (or its cloud provider) already uses.
| Tier | Sustained load | Capability required | What it means operationally |
|---|---|---|---|
| T0 — Single host | < 1k req/day | One machine running containers from a declarative multi-container file | Manual or scripted deploy; restart policy; backups; no autoscaling |
| T1 — Optimized single host or smallest managed runtime | 1k–10k req/day | Same as T0 with tuned resources, or the smallest managed container/app runtime | Managed TLS and health checks; still one logical instance |
| T2 — Managed autoscaling container platform | 10k–100k req/day | Horizontal autoscaling, rolling deploys, load balancing, per-instance health checks — all managed | Stateless app required; sessions and uploads must leave local disk |
| T3 — Distributed architecture | > 100k req/day | Multi-service scaling, independent deploy units, explicit failure isolation | Requires a team that can operate it; a cluster orchestrator is one option, not the definition of the tier |
Illustrative product examples only — never a recommendation: T0/T1 are commonly a VPS or single cloud VM with a Compose-style file; T2 is commonly a managed container service (ECS/Fargate, Cloud Run, Container Apps, App Runner); T3 may be a managed orchestrator, a serverless composition, or a partitioned set of T2 services. Pick from what the project already runs and what the team can operate.
Traffic is the entry heuristic, not the decision. Adjust for: payload size, request duration, statefulness, compliance/isolation requirements, and the size of the team on call.
| Trigger | Observed as | Tier change it justifies |
|---|---|---|
| Saturation | CPU/memory sustained > 70% at peak after tuning | T0 → T1 → T2 |
| Deploy downtime is unacceptable | Users see errors on every release | → T2 (rolling deploys) |
| Load is spiky and idle cost dominates | Peak/valley ratio > 5× | → T2 (scale-to-need) |
| Single-host failure is unacceptable | Availability target exceeds one machine's realistic uptime | → T2+ (redundancy) |
| Independent release cadence needed | Teams block each other on one deploy unit | → T3 (split services) |
| Regulatory or latency requirement per region | Data residency or a hard latency SLO in another region | → T3 (multi-region) |
If no trigger fires, the current tier is correct — regardless of how the platform looks compared to other projects.
Stated as capability comparisons — the products named are examples of the capability, not endorsements.
| Do not adopt | When the cheaper capability suffices | Cheaper capability |
|---|---|---|
| A cluster orchestrator | One host runs the workload within budget | Declarative multi-container file on a single host |
| An asynchronous message broker | Work is low-volume, tolerant of latency, or already synchronous | Scheduled job or a direct synchronous call |
| Multi-region deployment | One region plus tested restore meets the availability target | Single region + verified backups |
| A service mesh | Routing, TLS termination, and retries are handled at the edge | Reverse proxy / load balancer already in the stack |
| Serverless functions | Operations are long-running or fire at high constant frequency | A long-lived process (cost spikes and timeouts dominate otherwise) |
| A full third-party observability platform | The provider's built-in metrics/logs or a self-hosted stack answers the questions being asked | Provider-native monitoring or a self-hosted metrics stack |
| A dedicated cache tier | The database answers within the latency budget | Application-level or HTTP caching |
| A separate service | The boundary is not yet stable and one team owns both sides | A module inside the existing deployable |
Corollary: every "we'll need it later" argument must name the trigger from the table above that will fire, and roughly when. If no trigger can be named, the answer is "not yet".
Before approving a tier increase, answer all four:
skills/shared/adr/SKILL.md).Sizing is bidirectional. Revisit when: traffic dropped, a feature was retired, autoscaling floor never rises, or a managed service replaced something self-run. Removing an unused tier is the cheapest performance and reliability work available.