# Validator Node Pool Deployment

## Configuration

### Validator Nodes
- **Count**: 2 nodes
- **VM Size**: Standard_B1ms
- **vCPUs**: 1 per node (2 total)
- **Memory**: 2GB RAM per node (4GB total)
- **Type**: Burstable (B-series)

### Resource Summary
- **System Pool**: 3 × Standard_D2s_v3 (2 vCPUs, 8GB RAM each) = 6 vCPUs
- **Validator Pool**: 2 × Standard_B1ms (1 vCPU, 2GB RAM each) = 2 vCPUs
- **Total**: 8 vCPUs (within 10 vCPU limit) ✅

## Standard_B1ms Specifications

### Compute
- **vCPUs**: 1
- **Memory**: 2GB RAM
- **Burstable**: Yes (CPU credits)
- **Cost**: ~$0.0104/hour (~$7.50/month per node)

### Storage
- **OS Disk**: Up to 32GB (Premium SSD)
- **Data Disks**: Up to 2 disks
- **Max IOPS**: 1,920 IOPS

### Network
- **NICs**: 2 network interfaces
- **Bandwidth**: Moderate (up to 200 Mbps)

## Why Standard_B1ms for Validators?

### Advantages
1. **Fits Quota**: 1 vCPU allows 2 validators within 4 available vCPUs
2. **Cost Effective**: 90% cheaper than Standard_D2s_v3
3. **Sufficient for Besu**: 1 vCPU, 2GB RAM meets minimum requirements
4. **Burstable**: CPU credits for variable workloads
5. **Scalable**: Can upgrade to Standard_B2s or Standard_D2s_v3 later

### Considerations
- **CPU Credits**: B-series uses burst credits, monitor usage
- **Performance**: May need upgrade for high-volume production
- **Memory**: 2GB RAM is minimal, may need upgrade for large states

## Deployment Status

### Before Deployment
- **System Nodes**: 3 × Standard_D2s_v3 = 6 vCPUs
- **Total**: 6 vCPUs

### After Deployment
- **System Nodes**: 3 × Standard_D2s_v3 = 6 vCPUs
- **Validator Nodes**: 2 × Standard_B1ms = 2 vCPUs
- **Total**: 8 vCPUs (within 10 limit) ✅

## Monitoring

### Check Validator Nodes
```bash
# View node pool status
az aks nodepool show \
  --resource-group az-p-we-rg-comp-001 \
  --cluster-name az-p-we-aks-main \
  --name validators

# View all nodes
kubectl get nodes -o wide

# Check node resources
kubectl top nodes
```

### Monitor CPU Credits (B-series)
```bash
# Check Azure Monitor metrics
az monitor metrics list \
  --resource /subscriptions/fc08d829-4f14-413d-ab27-ce024425db0b/resourceGroups/az-p-we-rg-comp-001/providers/Microsoft.ContainerService/managedClusters/az-p-we-aks-main \
  --metric "Percentage CPU Credits Remaining"
```

## Next Steps

1. **Deploy Besu Validators**: Deploy Besu pods to validator nodes
2. **Monitor Performance**: Check CPU credits and performance
3. **Scale Up**: Upgrade to Standard_B2s if needed
4. **Deploy Sentries**: After quota increase or optimization

## Upgrade Path

### If Performance is Insufficient
- **Option 1**: Upgrade to Standard_B2s (2 vCPUs, 4GB RAM)
- **Option 2**: Upgrade to Standard_D2s_v3 (2 vCPUs, 8GB RAM)
- **Option 3**: Increase node count (need quota increase)

### Cost Comparison
- **Standard_B1ms**: ~$7.50/month (current)
- **Standard_B2s**: ~$15/month (2× cost, 2× vCPUs)
- **Standard_D2s_v3**: ~$70/month (9× cost, 2× vCPUs)
