Reserved Instances & Savings Plans

Commitment-Based Cost Optimization


Introduction

Reserved Instances (RI) and Savings Plans are Azure commitment models that offer significant discounts in exchange for consistent resource usage commitments. For integration workloads with predictable steady-state usage, these commitments can reduce costs by 30-60% compared to pay-as-you-go pricing. Understanding when to commit and how to optimize reservations is key to Azure cost management.

This comprehensive guide covers:

  • Reservation types — Understanding the options
  • Commitment planning — Calculating what to reserve
  • Purchase strategies — Optimizing reservation purchases
  • Management — Tracking and maintaining reservations
  • Azure integration services — What's available for reservation

Reservation Types

Azure Reserved VM Capacity

┌─────────────────────────────────────────────────────────────────────┐
│                  RESERVATION TYPES                                  │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   RESERVED CAPACITY (RI)                                            │
│   ────────────────────────                                          │
│   - Commit to specific VM size in region                            │
│   - 1 or 3 year commitment                                          │
│   - Discount: 40-60% vs pay-as-you-go                               │
│   - Best for: Predictable, consistent workload                      │
│                                                                     │
│   SAVINGS PLANS                                                     │
│   ────────────────                                                  │
│   - Commit to $ spend (any compute service)                         │
│   - 1 or 3 year commitment                                          │
│   - Discount: 30-60%                                                │
│   - Best for: Flexible, multi-service usage                         │
│                                                                     │
│   AZURE HYBRID BENEFIT                                              │
│   ─────────────────────────                                         │
│   - Use existing Windows/SQL licenses                               │
│   - Stack on top of reservations                                    │
│   - Additional 0-40% savings                                        │
│   - Best for: Windows/SQL workloads                                 │
│                                                                     │
│   RESERVED CAPACITY FOR SERVICES                                    │
│   ─────────────────────────────────                                 │
│   - Cosmos DB reserved RUs                                          │
│   - SQL Database reserved capacity                                  │
│   - Blob Storage reserved capacity                                  │
│   - Service Bus namespace capacity                                  │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Integration Service Reservations

{
  "reservationOptions": {
    "serviceBus": {
      "type": "Namespace Reservation",
      "discount": "Up to 40%",
      "commitment": "1 or 3 years",
      "scopes": "Single namespace, resource group, subscription"
    },
    "cosmosDB": {
      "type": "RU/s Reservation",
      "discount": "Up to 50%",
      "commitment": "1 or 3 years",
      "note": "Applies to all databases in account"
    },
    "sql": {
      "type": "DTU or vCore",
      "discount": "Up to 60%",
      "commitment": "1 or 3 years"
    },
    "functions": {
      "type": "Savings Plan",
      "discount": "Up to 50%",
      "commitment": "$ per hour",
      "note": "Any Azure compute (Functions, VMs, Containers)"
    }
  }
}

Commitment Planning

Calculating Commitment

public class ReservationCalculator
{
    public class ReservationRecommendation
    {
        public string ResourceType { get; set; }
        public int CurrentPayAsYouGoMonthlyCost { get; set; }
        public int RecommendedCommitment { get; set; }
        public int EstimatedSavings { get; set; }
        public string CommitmentTerm { get; set; }
    }

    public async Task<List<ReservationRecommendation>> 
        CalculateRecommendationsAsync(
            ResourceQuery query,
            TimeRange historicalData)
    {
        var recommendations = new List<ReservationRecommendation>();

        // Get historical usage
        var usage = await GetUsageDataAsync(query, historicalData);

        // Analyze patterns
        var steadyUsage = usage
            .Where(u => u.Variance < 0.1) // Low variance = steady
            .Average(u => u.Cost);

        if (steadyUsage > 100) // Only recommend if worthwhile
        {
            // 1-year commitment typically offers 30-40% savings
            var savingsMultiplier = 0.6m; // 40% off
            
            recommendations.Add(new ReservationRecommendation
            {
                ResourceType = query.ResourceType,
                CurrentPayAsYouGoMonthlyCost = (int)steadyUsage,
                RecommendedCommitment = (int)(steadyUsage * 12),
                EstimatedSavings = (int)(steadyUsage * 12 * savingsMultiplier),
                CommitmentTerm = "1 year"
            });

            // 3-year commitment offers additional ~10% savings
            var threeYearSavings = 0.7m; // 50% off
            if (IsLongTermCommitmentWorthwhile(steadyUsage, 3))
            {
                recommendations.Add(new ReservationRecommendation
                {
                    CommitmentTerm = "3 years",
                    EstimatedSavings = (int)(steadyUsage * 36 * threeYearSavings)
                });
            }
        }

        return recommendations;
    }
}

Reservation Scope

# Purchase at subscription level
az reservation order create \
  --reservation-order-name "integration-reservation" \
  --sku "Standard_D2s_v3" \
  --quantity 2 \
  --term "1Year" \
  --billing-scope "/subscriptions/xxx"

# Purchase at resource group level
az reservation order create \
  --reservation-order-name "rg-integration-reservation" \
  --sku "Standard_D2s_v3" \
  --quantity 2 \
  --term "1Year" \
  --billing-scope "/subscriptions/xxx/resourceGroups/rg-integration"

Purchase Optimization

Purchase Strategy

┌─────────────────────────────────────────────────────────────────────┐
│                  RESERVATION PURCHASE STRATEGY                      │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   STEP 1: IDENTIFY CANDIDATES                                       │
│   ────────────────────────────                                      │
│   • Resources with > 30% utilization (not idle)                     │
│   • Steady, predictable usage (> 3 months data)                     │
│   • Production workloads (not dev/test)                             │
│   • Minimum $100/month per resource                                 │
│                                                                     │
│   STEP 2: DETERMINE SCOPE                                           │
│   ─────────────────────────                                         │
│   • Subscription: Single workload, clear ownership                  │
│   • Resource Group: Cost center tracking                            │
│   • Management Group: Enterprise-wide                               │
│                                                                     │
│   STEP 3: SELECT TERM                                               │
│   ─────────────────                                                 │
│   • 1 year: Lower commitment, faster adjustment                     │
│   • 3 year: Maximum savings, longer lock-in                         │
│   • Consider expected workload changes                              │
│                                                                     │
│   STEP 4: OPTIMIZE PURCHASE                                         │
│   ───────────────────────                                           │
│   • Use Azure Hybrid Benefit where applicable                       │
│   • Consider savings plans for flexibility                          │
│   • Group similar resources in single reservation                   │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Savings vs Flexibility

{
  "commitmentDecision": {
    "reservedInstances": {
      "when": "Specific, known resource needs",
      "pros": [
        "Highest discount (40-60%)",
        "Predictable costs",
        "Specific resource guarantees"
      ],
      "cons": [
        "Less flexibility",
        "3-year lock-in",
        "Size locked"
      ]
    },
    "savingsPlan": {
      "when": "Flexible compute usage across services",
      "pros": [
        "Apply to Functions, VMs, Containers",
        "30-50% savings",
        "Flexible scope"
      ],
      "cons": [
        "Less discount than RI",
        "Currency commitment only"
      ]
    },
    "hybridBenefit": {
      "when": "Windows Server or SQL licenses",
      "pros": [
        "Stack on reservations",
        "Additional 0-40% savings"
      ],
      "cons": [
        "Requires existing licenses"
      ]
    }
  }
}

Management and Optimization

Reservation Utilization

# View reservation utilization
az reservations reservation-list \
  --reservation-order-name "integration-reservation" \
  --query "[].{Name:name, Utilization:utilization}"

# Check daily utilization
az monitor metrics list \
  --resource /subscriptions/xxx/providers/Microsoft.Capacity/reservations/integration-reservation \
  --metric-name "UtilizationPercentage"

Optimization Recommendations

public class ReservationOptimizer
{
    public async Task<List<ReservationChange>> 
        OptimizeReservationsAsync()
    {
        var changes = new List<ReservationChange>();

        var reservations = await GetAllReservationsAsync();

        foreach (var res in reservations)
        {
            var utilization = await GetUtilizationAsync(res.Id, TimeRange.Last30Days);

            if (utilization < 50)
            {
                // Underutilized - consider reducing
                changes.Add(new ReservationChange
                {
                    ReservationId = res.Id,
                    CurrentQuantity = res.Quantity,
                    RecommendedQuantity = (int)(res.Quantity * utilization / 100),
                    MonthlySavings = (res.Quantity - (int)(res.Quantity * utilization / 100)) * res.UnitPrice,
                    Action = "Reduce"
                });
            }
            else if (utilization > 100)
            {
                // Overcommitted - consider increasing
                changes.Add(new ReservationChange
                {
                    ReservationId = res.Id,
                    CurrentQuantity = res.Quantity,
                    RecommendedQuantity = res.Quantity + 1,
                    Action = "Increase"
                });
            }
        }

        return changes;
    }
}

Best Practices

Implementation Checklist

PracticeDescription
Track utilizationKnow which reservations are used
Plan annual reviewReassess commitments yearly
Start with productionReserve stable production workloads
Consider savings plansMore flexible for varying needs
Use Hybrid BenefitStack with Windows/SQL
Match scope to needsResource group for cost tracking

Common Mistakes

┌─────────────────────────────────────────────────────────────────────┐
│                  RESERVATION MISTAKES                               │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   ✗ Reserving idle resources                                        │
│   ✗ Committing too early (not enough data)                          │
│   ✗ Choosing wrong scope                                            │
│   ✗ Not using Hybrid Benefit                                        │
│   ✗ Ignoring underutilized reservations                             │
│   ✗ 3-year commitment for changing workloads                        │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Related Topics


Azure Integration Hub - Architect Level Cost Architecture & FinOps