Stage 3, Part 4 of 10 · p. 22, Control Plane Internals
PART 4: CAPACITY PLANNING & COST MODELING
18. etcd Sizing and Performance
etcd Capacity Planning
| Cluster Size | etcd Nodes | CPU | Memory | Disk |
| < 100 nodes | 3 | 2 | 8 GB | 50 GB SSD |
| 100-500 nodes | 3 | 4 | 16 GB | 100 GB SSD |
| 500-1000 nodes | 5 | 8 | 32 GB | 200 GB NVMe |
| > 1000 nodes | 5 | 16 | 64 GB | 500 GB NVMe |
etcd Performance Metrics
| Metric | Target |
| fsync latency | < 10ms |
| WAL fsync duration | < 25ms (p99) |
| DB size | < 2 GB |
| Leader changes | 0 per hour (stable) |
| Request latency | < 50ms (p99) |
The Disk I/O Warning
Mechanical HDDs have fsync latency > 10ms. This causes:
- Heartbeat delays
- False leader elections
- API server timeouts
Always use SSD or NVMe for etcd.
19. Control Plane Capacity Planning
API Server Scaling
| Factor | Impact |
| Requests/second | More API server replicas |
| Webhooks | Each webhook adds latency |
| APF | Protects against overload |
| Load balancer | Required for HA |
API Server Resource Requirements
| Cluster Size | CPU per replica | Memory per replica |
| < 100 nodes | 2 | 4 GB |
| 100-500 nodes | 4 | 8 GB |
| 500-1000 nodes | 8 | 16 GB |
| > 1000 nodes | 16 | 32 GB |
Scheduler and Controller Manager
| Component | CPU | Memory |
| Scheduler | 2 | 2 GB |
| Controller Manager | 2 | 4 GB |
20. SLA & Availability Design
Availability Math
text
99.9% = 8.76 hours downtime/year
99.99% = 52.56 minutes downtime/year
99.999% = 5.26 minutes downtime/year
Control Plane SLA Design
| Target | Architecture |
| 99.9% | Single control plane, etcd backups |
| 99.99% | 3-node HA control plane, 3-node etcd |
| 99.999% | 5-node HA control plane, 5-node etcd, multi-AZ |
The Failover Time
| Failure | Failover Time |
| API server pod | Instant (load balancer) |
| Scheduler leader | ~15s (lease expiry) |
| Controller manager leader | ~15s (lease expiry) |
| etcd leader | ~1-2s (Raft election) |
1:1 copy of the class Google Doc, code in code blocks.