Azure compute

From manu14357/zskills · View interactive version

Azure compute is an AI agent skill from the GitHub repository manu14357/zskills. Select and implement the right Azure compute platform for a workload. Decision tree guides choice based on workload characteristics, scaling needs, and operational maturity. Covers serverless, PaaS, containers, Kubernetes, and IaaS patterns.

How to use this skill

Skill file

Azure Compute

Choose the compute option with the lowest operational burden that meets your workload's functional and non-functional requirements.

Managed services first; IaaS only when control is mandatory.

Use This Skill When

Context: Compute Maturity Spectrum

Serverless (Least ops):
  Azure Functions
  └─ Pro: Zero infrastructure, auto-scale, pay-per-exec
  └─ Con: Cold starts, max 10-min timeout, limited languages

PaaS (Low ops):
  App Service
  └─ Pro: Built-in scaling, diagnostics, deployment slots
  └─ Con: Single-region, limited customization
  
  Container Apps
  └─ Pro: Container-native, auto-scaling, event-driven
  └─ Con: Smaller ecosystem, newer service

Containers + Orchestration:
  Azure Kubernetes Service (AKS)
  └─ Pro: Full Kubernetes control, multi-region, custom scaling
  └─ Con: Requires Kubernetes expertise, higher operational burden

IaaS (Most control, Most ops):
  Virtual Machines / VMSS
  └─ Pro: OS-level control, custom binaries, legacy support
  └─ Con: Requires manual patching, scaling, monitoring

Required Inputs

Decision Tree

Is this a background job triggered by an event (file upload, message queue, timer)?
├─ Yes → Azure Functions (lowest cost, auto-scale, easy)
│         But if: Job runs >10 min → Container Apps or App Service
└─ No → Continue

Is this a stateless HTTP API or web app?
├─ Yes → App Service (built-in scaling, diagnostics)
│         Or: Container Apps (if containerized, multi-region)
├─ Needs Kubernetes → AKS
└─ No → Continue

Does this need OS-level control (custom packages, specific kernel version)?
├─ Yes → Virtual Machines or VMSS
└─ No → One of above managed options

Is latency critical (< 100ms p99)?
├─ Yes → Consider colocating compute with data store (same region/AZ)
│         Evaluate: App Service Plan, VMSS, or Container Apps with CPU optimization
└─ No → Standard deployment acceptable

Do you need to orchestrate multiple microservices?
├─ Yes → AKS (service mesh, traffic mgmt, multi-region)
│         Or: App Service + API Management (simpler, less overhead)
└─ No → Single-service option (Functions, App Service)

Workflow

Phase 1: Characterize Workload

  1. Inventory current state:
  1. Predict load profile:
  1. Define SLA:

Phase 2: Evaluate Candidates

Candidate 1: Azure Functions

✓ Event-driven, API-triggered, timer-based workloads
✓ Zero infrastructure, auto-scale to thousands
✓ Pay only for execution time
✗ Cold starts (first invocation 1-5 sec)
✗ Max 10-minute execution timeout
✗ Limited to 1.5 GB memory per invocation
✗ Not suitable for stateful or long-running tasks

Cost estimate: 1M invocations/month × $0.20/1M = $0.20 + compute duration charges

Candidate 2: App Service

✓ Web APIs, web apps, long-running services
✓ Instant startup (no cold start)
✓ Built-in auto-scale, deployment slots
✓ Integrated diagnostics, backups
✗ Single region (unless you manage multi-region)
✗ Always-on instances (minimum cost even at 0 traffic)

Cost estimate: P1V2 plan (1 core, 1.75 GB) = $74/month × 2 instances = $148/month

Candidate 3: Container Apps

✓ Containerized microservices, event-scale
✓ Auto-scale to zero (similar to Functions)
✓ Multi-region deployment
✗ Newer service, smaller ecosystem
✗ Kubernetes learning curve

Cost estimate: 0.5 vCPU, 1 GB memory, auto-scale = ~$30-50/month

Candidate 4: AKS

✓ Complex microservices orchestration
✓ Service mesh, traffic mgmt, canary deployments
✓ Multi-region, high availability
✓ Kubernetes portability
✗ Requires Kubernetes expertise
✗ Significant operational overhead
✗ Higher minimum cost (node pool)

Cost estimate: 3-node cluster (B2S VMs) = $30/month × 3 + storage + egress = $100-200/month+

Candidate 5: Virtual Machines

✓ Legacy app, custom OS packages, GPL software
✓ OS-level control
✗ Manual scaling, patching, monitoring
✗ Highest operational burden
✗ Highest minimum cost

Cost estimate: D2s_v3 VM = $97/month × 2 (HA) = $194/month minimum

Phase 3: Size and Scale

  1. Baseline sizing (off-peak):
  1. Scaling policy:
  1. Cost impact of scaling:

Output Contract

  1. Recommended Compute Option
  1. Justification & Trade-Offs
  1. Sizing & Scaling
  1. Cold Start & Latency Impact
  1. Operational Checklist
  1. Migration Readiness

Practical Examples

Example 1: Bursty Event-Driven Workload

Workload: Image resize triggered on file upload to blob storage

Example 2: Steady HTTP API

Workload: REST API for mobile app

Example 3: Microservices Architecture

Workload: 5 services: API gateway, auth, billing, inventory, notifications

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.