# Multi-Region Deployment - Quota Summary

## Subscription: 6d3c4263-bba9-497c-8843-eae6c4e87192

## 6-Region Deployment Configuration

### Strategy: Distribute Workload Across 6 Regions

By deploying across 6 regions with different VM families, we:
- **Reduce quota per region** from 58+ vCPUs to **18 vCPUs**
- **Use available quotas** without requiring increases
- **Improve availability** with geographic redundancy
- **Optimize costs** using appropriate VM families

## Per-Region Configuration

### All Regions Use Same Configuration

| Node Pool | VM Size | Family | vCPUs | Quota Used |
|-----------|---------|--------|-------|------------|
| System | Standard_D2_v2 | Dv2 | 2 | Dv2: 2/10 |
| Validators | Standard_D4_v2 | Dv2 | 4 | Dv2: 4/10 |
| Sentries | Standard_D4_v2 | Dv2 | 4 | Dv2: 4/10 |
| RPC | Standard_D8s_v6 | Dsv6 | 8 | Dsv6: 8/10 |
| **Total** | | | **18** | **Dv2: 10/10, Dsv6: 8/10** ✅ |

### Quota Utilization Per Region

- **Dv2 Family**: 10/10 vCPUs (at limit) ✅
- **Dsv6 Family**: 8/10 vCPUs (within limit) ✅
- **Total**: 18 vCPUs per region

## Regional Deployment

| Region | Code | Nodes | vCPUs | Status |
|--------|------|-------|-------|--------|
| **West Europe** | we | 4 | 18 | ✅ Configured |
| **North Europe** | ne | 4 | 18 | ✅ Configured |
| **France Central** | fc | 4 | 18 | ✅ Configured |
| **UK South** | uk | 4 | 18 | ✅ Configured |
| **Sweden Central** | sc | 4 | 18 | ✅ Configured |
| **Norway East** | no | 4 | 18 | ✅ Configured |
| **TOTAL** | | **24** | **108** | ✅ **All within quotas** |

## Available Quotas by Region

### All Regions Have Similar Quotas

Each region has:
- Standard Dv2 Family: **10 vCPUs available**
- Standard Dsv6 Family: **10 vCPUs available**
- Standard D Family: **10 vCPUs available**
- Standard Av2 Family: **10 vCPUs available**
- Standard Dv2 Promo Family: **10 vCPUs available**

**Total per region**: ~50 vCPUs across different families

## Benefits

### 1. Quota Optimization
- **Before**: 58+ vCPUs needed in single region
- **After**: 18 vCPUs per region (69% reduction)
- **Result**: No quota increase required

### 2. High Availability
- **6 regions** provide geographic redundancy
- **Automatic failover** capability
- **Lower latency** for regional users

### 3. Cost Efficiency
- **Dv2 Family**: Cost-effective for most workloads
- **Dsv6 Family**: Premium performance for RPC nodes
- **Optimized** VM family selection per workload

### 4. Scalability
- **Easy to add** more regions
- **Flexible** node counts per region
- **Independent** scaling per region

## Deployment Steps

### 1. Enable Multi-Region

```bash
cd terraform
cp terraform.tfvars.multi-region terraform.tfvars
```

### 2. Review Configuration

Edit `terraform/multi-region.tf` if needed to adjust:
- Regions to deploy
- Node counts per region
- VM families per region

### 3. Initialize and Deploy

```bash
terraform init
terraform plan -out=tfplan
terraform apply tfplan
```

## Monitoring

### Per-Region Metrics

- **Cluster Health**: Monitor each region independently
- **Quota Usage**: Track quota consumption per region
- **Performance**: Compare performance across regions
- **Costs**: Monitor costs per region

### Cross-Region Monitoring

- **Global Dashboard**: Aggregate metrics from all regions
- **Alerting**: Set up alerts for quota thresholds
- **Cost Analysis**: Track total costs across regions

## Cost Estimate

### Monthly Costs (Approximate)

| Region | Nodes | Estimated Cost/Month |
|--------|-------|---------------------|
| West Europe | 4 | ~$300-400 |
| North Europe | 4 | ~$300-400 |
| France Central | 4 | ~$300-400 |
| UK South | 4 | ~$300-400 |
| Sweden Central | 4 | ~$300-400 |
| Norway East | 4 | ~$300-400 |
| **Total** | **24** | **~$1,800-2,400** |

*Note: Costs vary based on VM sizes, usage, and Azure pricing*

## Next Steps

1. ✅ Configure multi-region Terraform
2. ⏳ Deploy primary region (West Europe)
3. ⏳ Deploy secondary regions (North Europe, France Central)
4. ⏳ Deploy additional regions (UK South, Sweden Central, Norway East)
5. ⏳ Configure cross-region networking
6. ⏳ Set up global load balancing
7. ⏳ Configure monitoring and alerting

## Troubleshooting

### Quota Issues

If a region runs out of quota:
1. Check alternative VM families (D Family, Av2, etc.)
2. Reduce node counts in that region
3. Add additional regions
4. Use Dv2 Promo Family (if available)

### Network Issues

If cross-region connectivity fails:
1. Verify VNet peering configuration
2. Check NSG rules
3. Validate private endpoints
4. Review Application Gateway configuration


