100%
GRIMOIRE
الكتابمدونة البيبيمجلدات التوليفThe Foundation of Iron (EN)
FRENAR
RATIO
OPÉRATION DINDON
دليل تقني عملي · Opération Dindon · يونيو 2026 · بالإنجليزية أصلًا
◆◆◆
دليل تقليل تكلفة السحابة
AWS · GCP · Azure — النسخة العالمية
◆ ملاحظة على النسخة العربية

هذه الدراسة دليل تقني عملي — سلاسل أوامر دقيقة، وملفّات تهيئة، وقيم مُحدَّدة (عناوين IP، وأسماء الحزم، ومعاملات سطر الأوامر). تُبقيها هذه الطبعة العربية بالإنجليزية الأصلية عمدًا: ترجمة أمر طرفية أو اسم معامل تُفقِده دقّته وتُخاطِر بجعله غير قابل للتنفيذ حرفيًا. النصّ الأصلي هو الأداة القابلة للاستخدام مباشرة — أي إعادة صياغة تُفقِده وزنه العملي.

◆◆◆
أمين غيتي — مهندس بنية تحتية و SRE
أستاذ سابق بمدرسة هندسة · مدرّب بنية تحتية
وثيقة عامة · CC BY-NC-SA 4.0 · Opération Dindon
OPS
SRE/OPS GUIDE · TECHNICAL DOCUMENT · GLOBAL MARKET · JUNE 2026
◆◆◆
CLOUD COST REDUCTION
& PROGRESSIVE MIGRATION
AWS · Google Cloud · Microsoft Azure
Operational guide for SRE, Ops and Infrastructure Architect teams
33 technical blocks · 3 cleaning sections · Reference open-source stack
Summary tables per hyperscaler
◆◆◆
33technical blocks
3cleaning sections
6open-source tables
3Summary tables
TABLE OF CONTENTS — 12 PAGES
◆ Page 2 — AWS · Compute & Network (5 blocks)
◆ Page 3 — AWS · Storage · DB · Serverless · Cleanup (5 blocks)
◆ Page 4 — AWS · Progressive Migration
◆ Page 5 — GCP · BigQuery · Compute · Network (5 blocks)
◆ Page 6 — GCP · Storage · DB · AI · Cleanup (5 blocks)
◆ Page 7 — GCP · Progressive Migration
◆ Page 8 — Azure · Compute · Network · Storage (5 blocks)
◆ Page 9 — Azure · DB · AI · Data · Cleanup (5 blocks)
◆ Page 10 — Azure · Progressive Migration
◆ Page 11 — Reference Open-Source Stack (synthesis)
◆ Page 12 — Quick Reference Tables AWS · GCP · Azure
◆◆◆
This document is purely technical. It contains no legal references or political dimension.
Cost reduction estimates are indicative and based on common use cases.
Actual savings vary depending on architecture, region, volume and utilisation level.
◆◆◆
Amine RAITI · Infrastructure Architect & SRE · Paris
Public document · CC BY-NC-SA 4.0 · AI Powered by Amine
OPS
AWS · PAGE 1/3 · COMPUTE & NETWORK
AMAZON WEB SERVICES — COMPUTE · NETWORK · EKS · VPN
Indicative estimates based on common use cases · Actual savings vary by architecture and volume
◆ BLOCK 1 · NAT GATEWAY — The most overestimated line itemHIGH IMPACT
Real cost: $0.045/h × 8,760h = ~$390/yr + $0.045/GB processed → up to $7,500/yr for a standard multi-AZ setup
✅ ALT 1 · NAT Instance (t3.nano/t3.small) → same function · cost ~$130–220/yr · reduction 70–85% · trade-off: manual HA management
✅ ALT 2 · VPC Endpoints (S3 · DynamoDB · SQS · SSM) → transfers to internal AWS services are free · zero refactoring if already on AWS SDK
✅ ALT 3 · PrivateLink for managed services → avoids NAT Gateway transit · billed per connection only
🔧 When to keep NAT Gateway: critical workloads requiring managed high availability without human intervention
◆ BLOCK 2 · EKS — Elastic Kubernetes ServiceAVERAGE IMPACT
Real cost: $0.10/h per cluster = $876/yr per cluster · independent of node count · 5 clusters = $4,380/yr for control plane alone
✅ ALT 1 · Cluster consolidation: 5 env. clusters → 2 (prod + non-prod) with namespaces + Network Policies → direct control plane savings
✅ ALT 2 · Karpenter vs Cluster Autoscaler → provision at exact granularity required by pods · reduces over-provisioning 20–40%
✅ ALT 3 · Spot instances for non-critical nodes (CI/CD · batch · dev) → 60–90% reduction on node cost
✅ ALT 4 · k3s or k0s self-managed on EC2 → eliminates control plane fees · for non-critical and edge environments
◆ BLOCK 3 · EC2 RESERVED INSTANCES & SAVINGS PLANSHIGH IMPACT
Trap: 1–3 year non-cancellable commitment · frequent over-commitment during growth peaks → fixed cost persists even if workloads disappear
✅ ALT 1 · Compute Savings Plans vs EC2 Instance SP → more flexibility on instance type and region · preferred for evolving architectures
✅ ALT 2 · Spot Instances for interruptible workloads → 60–90% reduction · ideal: ML training · batch · CI/CD · rendering
✅ ALT 3 · Graviton (ARM) vs x86 → same performance · 20% cheaper on equivalent instances · available on EC2 · Lambda · RDS · ElastiCache
🔧 AWS Compute Optimizer → rightsizing recommendations based on actual 14-day usage · free
◆ BLOCK 4 · VPN & CONNECTIVITYAVERAGE IMPACT
Direct Connect: billed by reserved capacity (1G ports = ~$1,500/mo) · often over-sized for light hybrid connections
✅ VPN Site-to-Site: $50–100/mo · sufficient for <500 Mbps · 80–90% reduction vs Direct Connect
✅ Direct VPC Peering (2–5 VPCs) → free at the service level · only inter-region egress is billed · avoids Transit Gateway fees ($0.05/GB)
◆ BLOCK 5 · ECS FARGATEAVERAGE IMPACT
Fargate bills per vCPU + allocated memory = 3–4× more expensive than EC2 for stable, predictable workloads
✅ ECS on EC2 Spot for predictable workloads → 50–70% reduction
✅ Fargate Spot for interruptible workloads → 50–70% reduction vs Fargate on-demand
✅ Migrate to Kubernetes (EKS/k3s) for organisations with K8s expertise → better cost control
OPS
AWS · PAGE 2/3 · STORAGE · DB · SERVERLESS · OBSERVABILITY · CLEANUP
AMAZON WEB SERVICES — S3 · RDS · LAMBDA · CLOUDWATCH · CLEANUP
Indicative estimates based on common use cases
◆ BLOCK 6 · S3 & DATA TRANSFERHIGH IMPACT
Internet egress: $0.09/GB · Standard storage: $0.023/GB · storage tiers often misused
✅ S3 Intelligent-Tiering → auto-migration to IA/Glacier based on access · 40–70% reduction on cold data
✅ S3 Select → transfer only filtered data, not the entire object
✅ CloudFront in front of S3 → reduces direct requests and Internet egress
✅ MinIO S3-compatible on-premise for non-critical data → zero egress
◆ BLOCK 7 · RDS & DATABASESHIGH IMPACT
RDS Multi-AZ db.r5.large: ~$440/mo · often over-sized by 2–3× vs actual usage
✅ Aurora Serverless v2 → billed per ACU · suited for variable workloads · scale-to-zero possible
✅ RDS Proxy → reduces connections · optimises utilisation · improves resilience
✅ PostgreSQL/MySQL on EC2 Spot + PgBouncer → 40–60% reduction · trade-off: manual maintenance
✅ Rightsizing via Performance Insights → identify over-provisioned instances
◆ BLOCK 8 · LAMBDA & SERVERLESSAVERAGE IMPACT
Cold starts + duration billing + Provisioned Concurrency = frequent sources of unanticipated overspend
✅ Lambda Power Tuning → find the memory/cost optimum per function · open-source AWS tool
✅ Graviton2 for Lambda → 20% cheaper · 19% faster on average
✅ Continuous workloads → EC2 or Fargate often cheaper than Lambda beyond 15min/invocation
✅ SnapStart (Java) → eliminates cold starts on JVM functions
◆ BLOCK 9 · CLOUDWATCH · LOGS · OBSERVABILITYAVERAGE IMPACT
Log ingestion: $0.50/GB · storage: $0.03/GB · can represent 15–20% of the total bill without monitoring
✅ OpenTelemetry + Grafana + Loki self-managed → 70–90% reduction on observability
✅ Subscription filters before CloudWatch ingestion → log only what is useful
✅ S3 + Athena for long-term log archiving vs CloudWatch Logs Insights
✅ Metric Streams to Grafana Cloud → cheaper than CloudWatch custom metrics
◆ BLOCK 10 · CLEANUP — AMIs · EBS · Snapshots · Elastic IPs · ECR · Stopped InstancesIMMEDIATE SAVINGS
🔵 Stale AMIs: each AMI stores underlying EBS snapshots ($0.05/GB/mo) · a CI/CD pipeline without cleanup accumulates hundreds of AMIs → monthly audit + retention policy (e.g. keep last 5)
🔵 Detached EBS Volumes: billed at $0.08–0.10/GB/mo even without an attached instance · identify via: aws ec2 describe-volumes --filters Name=status,Values=available
🔵 Orphaned EBS Snapshots: snapshots whose source volume has been deleted · no operational value · often hundreds of GB accumulated
🔵 Unassigned Elastic IPs: $0.005/h (~$44/yr each) · an EIP not attached to a running instance is billed
🔵 Untagged / old ECR images: no pull cost but storage at $0.10/GB/mo · ECR lifecycle policy for automatic cleanup
🔵 Stopped EC2 instances: attached EBS volumes continue to be billed · associated Elastic IPs too
🔧 Tools: AWS Cost Explorer (Idle Resources) · AWS Trusted Advisor · aws-nuke (full non-prod cleanup) · CloudCustodian · Infracost
OPS
AWS · PAGE 3/3 · PROGRESSIVE MIGRATION TO ALTERNATIVES
AMAZON WEB SERVICES — STEP-BY-STEP MIGRATION STRATEGY
Indicative estimates · Effort: L=Low (days) · M=Medium (weeks) · H=High (months)
◆ PROGRESSIVE MIGRATION PRINCIPLE

Do not migrate all at once. Identify high-egress or high contractual cost services first. Abstract SDK dependencies before physically migrating. Each service migrated to an open standard is an additional negotiation lever against AWS.

◆ BLOCK 11 · AWS MIGRATION STRATEGY → ALTERNATIVES
AWS service
Alternative
Method
Effort
Saving
S3
MinIO · Backblaze B2 · Cloudflare R2
Standard S3 SDK → zero refactoring
L
Egress →0
Lambda
OpenFaaS · Knative · Fission
Same Python/Node/Go runtime · adapt handler
M
60–80%
RDS PostgreSQL
Aiven · Neon · Render · Supabase
pg_dump / pg_restore · zero application refactoring
L
30–50%
EKS
k3s · k0s · EKS anywhere
Velero backup/restore · identical manifests
M
Free Control plane
CloudWatch
OpenTelemetry + Grafana + Loki
OTel agent → replaces CloudWatch agent
M
70–90%
Bedrock / SageMaker
vLLM + Llama 3 · Hugging Face self-hosted
OpenAI-compatible API → change endpoint URL only
M
60–90%
MSK (Kafka)
Apache Kafka self-managed · Redpanda
Same Kafka clients → zero refactoring
M
40–60%
ElastiCache Redis
Redis self-managed · KeyDB · Dragonfly
Same Redis protocol → zero refactoring
L
40–60%
NAT Gateway
NAT Instance t3.nano + VPC Endpoints
Replace in route tables · iptables
L
70–85%
Indicative estimates · L=days · M=weeks · H=months · discounts vs. AWS managed on-demand service
◆ RECOMMENDED MIGRATION ORDER

1. Observability (CloudWatch → OTel stack) — immediate bill impact
2. Object storage (S3 → MinIO/Backblaze B2) — zero refactoring
3. Relational databases (RDS → Aiven/Supabase) — pg_dump/restore
4. Serverless (Lambda → OpenFaaS) — adapt the handler
5. Kubernetes (EKS → k3s) — Velero for workloads
6. AI/ML (Bedrock → vLLM) — adapt the API endpoint

◆ AWS MIGRATION TOOLS
✅ Velero → K8s workload backup/restore cross-cluster
✅ AWS DataSync → S3 data transfer to external destination
✅ OpenTofu (Terraform BSL fork) → portable multi-cloud IaC
✅ Infracost → cost estimates before Terraform deployment
✅ aws-nuke → full non-prod environment cleanup
OPS
GCP · PAGE 1/3 · BIGQUERY · COMPUTE · NETWORK · CLOUD RUN
GOOGLE CLOUD PLATFORM — BIGQUERY · GKE · COMPUTE · NETWORK
Indicative estimates based on common use cases
◆ BLOCK 1 · BIGQUERY — The most explosive line itemVERY HIGH IMPACT
Real on-demand cost: $5/TB scanned · a poorly written query on a 10TB table = $50 per run · a dashboard refreshing hourly = $1,200/mo
✅ Date/column partitioning → reduces scans by 80–95% on time-based queries · schema change only
✅ Clustering on frequently filtered columns → reduces scans on filter queries · stackable with partitioning
✅ Materialized views → pre-compute frequent aggregations · auto-updated · billed on delta only
✅ BI Engine → in-memory cache for dashboards · fixed monthly cost vs variable per-query cost · worthwhile from 3+ active dashboards
✅ Flat-rate slots vs on-demand → cost-effective from ~$2,200/mo in queries · 1-year or flexible monthly commitment
✅ Require partition filter → force queries to filter on partition · prevents accidental full scans
✅ Open-source alternatives: ClickHouse (OLAP columnar · 10–100× faster on aggregations) · DuckDB (local analytics · zero infra) · Apache Druid (real-time) · export BigQuery to Parquet via BQ Storage API → direct ClickHouse import with no transformation
◆ BLOCK 2 · GKEAVERAGE IMPACT
Free control plane (1 Autopilot cluster) · nodes billed on requested resource
✅ Autopilot vs Standard → Autopilot bills pods · Standard bills full nodes · Autopilot better for variable workloads
✅ Spot VMs for non-critical nodes → 60–91% reduction
✅ Vertical Pod Autoscaler → auto-adjusts requests/limits · reduces over-provisioning
✅ KEDA → scale-to-zero for event-driven workloads
◆ BLOCK 3 · COMPUTE ENGINE & CUDsHIGH IMPACT
CUD trap: 1–3 year commitment · no refund on termination (GCP s.8.8)
✅ Spot VMs → 60–91% reduction · ideal: ML training · batch · CI/CD
✅ Custom Machine Types → pay exactly the vCPU/RAM needed without rounding up
✅ Sole-tenant nodes for workloads requiring physical isolation · cheaper than over-specification
🔧 GCP Recommender → automatic rightsizing based on actual usage
◆ BLOCK 4 · VPC & NETWORK GCPAVERAGE IMPACT
Cloud NAT: IP address + processed volume · Cloud Interconnect: reserved capacity (k$/mo)
✅ NAT on Spot instance → same approach as AWS · 70–85% reduction
✅ Cloud VPN (~$50/mo) vs Cloud Interconnect for hybrid connections <500 Mbps
✅ Direct VPC Peering vs Cloud Interconnect for simple architectures
◆ BLOCK 5 · CLOUD RUN & FUNCTIONSAVERAGE IMPACT
Min-instances >0 = billed even without traffic · watch for idle costs
✅ Min instances = 0 for non-critical workloads → billed on usage only
✅ Cloud Run Spot → 60–91% reduction for batch processing
✅ Knative self-managed on GKE → removes Cloud Run dependency · same API
✅ CPU always allocated = false → CPU throttled outside requests = cheaper
OPS
GCP · PAGE 2/3 · STORAGE · DB · AI · OBSERVABILITY · CLEANUP
GOOGLE CLOUD — CLOUD STORAGE · CLOUD SQL · VERTEX AI · CLEANUP
Indicative estimates based on common use cases
◆ BLOCK 6 · CLOUD STORAGE & DATA TRANSFERHIGH IMPACT
Internet egress: $0.08–0.12/GB by region · inter-region transfers: $0.01–0.08/GB
✅ Nearline / Coldline / Archive for cold data → 60–90% storage reduction
✅ Cloud CDN in front of GCS → reduces direct requests and egress
✅ Storage Transfer Service for migrations → reduced rate vs standard egress
✅ S3-compatible providers (Backblaze B2 · Cloudflare R2 · Wasabi) for non-critical data
◆ BLOCK 7 · CLOUD SQLHIGH IMPACT
HA instance db-n1-standard-4: ~$660/mo · storage and replicas billed separately
✅ AlloyDB for PostgreSQL-compatible workloads → better perf/cost on intensive loads
✅ Cloud SQL + pgBouncer → reduces connections · optimises resources
✅ PostgreSQL on GCE Spot + PgBouncer → 50–70% reduction · trade-off: maintenance
✅ Aiven for PostgreSQL · Neon · Supabase → managed · cheaper than Cloud SQL
◆ BLOCK 8 · VERTEX AI & MANAGED AIHIGH IMPACT
A100 80GB GPU: ~$3/h · V100: ~$2/h · training and inference cost highly variable by usage
✅ Spot VMs for training (interruptible by nature) → 60–91% reduction
✅ Model quantization + pruning → reduces model size and inference cost by 50–80%
✅ Hugging Face + vLLM self-hosted on Spot GPU → 60–90% reduction vs Vertex AI Prediction
✅ Ollama for local development → eliminates all inference costs in dev/test
◆ BLOCK 9 · GCP OBSERVABILITYAVERAGE IMPACT
Log ingestion: $0.50/GB · custom metrics: $0.10/metric/mo · can explode with many services
✅ OpenTelemetry + Prometheus + Grafana + Loki → full replacement · 70–90% reduction
✅ Log exclusion via Log Router → filter low-value system logs before ingestion
✅ GCP Managed Prometheus → cheaper than Cloud Monitoring custom metrics for K8s metrics
◆ BLOCK 10 · CLEANUP — Persistent Disks · Snapshots · Images · Stopped Instances · Abandoned BucketsIMMEDIATE SAVINGS
🔵 Detached Persistent Disks: billed $0.04–0.17/GB/mo by type (Standard/SSD/Extreme) even without attached VM · identify via: gcloud compute disks list --filter="NOT users:*"
🔵 Orphaned snapshots: snapshots of deleted disks · no operational value · regular audit required · cost $0.026/GB/mo
🔵 Unused Compute Engine images: custom images unused for 90+ days → automatic archiving policy to Cloud Storage (Coldline)
🔵 Stopped instances: attached persistent disks continue to be billed · reserved unassigned IPs too ($0.010/h)
🔵 Abandoned Cloud Storage buckets: buckets created for completed projects · often forgotten · Object Lifecycle Management for automatic cleanup
🔵 Unmanaged Instance Groups: instances in unmanaged groups often forgotten after migrations · quarterly audit recommended
🔧 Tools: GCP Recommender (idle VMs · underused disks) · gcpdiag · Infracost · Active Assist · Cloud Asset Inventory for full resource audit
OPS
GCP · PAGE 3/3 · PROGRESSIVE MIGRATION TO ALTERNATIVES
GOOGLE CLOUD — STEP-BY-STEP MIGRATION STRATEGY
Indicative estimates · Effort: L=Low (days) · M=Medium (weeks) · H=High (months)
◆ GCP-SPECIFIC WARNING — COMMITTED USE DISCOUNTS

GCP CUDs offer no refund on termination (s.8.8). Migration must be planned so commitments are consumed naturally during transition. Never terminate a CUD early — migration savings never offset the total loss of the committed amount.

◆ BLOCK 11 · GCP MIGRATION STRATEGY → ALTERNATIVES
GCP Service
Alternative
Method
Effort
Saving
BigQuery
ClickHouse · DuckDB
Export Parquet via BQ Storage API · direct import
M
70–90%
Cloud Storage (GCS)
MinIO · Scaleway Object
gsutil rsync → zero refactoring if S3 SDK abstracted
L
Egress →0
Cloud SQL PostgreSQL
Aiven · Clever Cloud
pg_dump / pg_restore · zero application refactoring
L
30–50%
GKE
k3s · k0s self-managed
Velero backup/restore · identical K8s standard manifests
M
Free Control plane
Cloud Functions
OpenFaaS · Knative
Same runtime · adapt the input handler
M
60–80%
Cloud Monitoring/Logging
OTel + Prometheus + Grafana + Loki
OTel Collector replaces GCP agent
M
70–90%
Vertex AI (inférence)
vLLM · Hugging Face
OpenAI-compatible API → change endpoint URL only
M
60–90%
Cloud Pub/Sub
Apache Kafka · Redpanda
Adapt publishers/consumers · same semantics
M
40–60%
Memorystore Redis
Redis self-managed · KeyDB
Same Redis protocol → zero refactoring
L
40–60%
Indicative estimates · L=days · M=weeks · discounts vs. managed on-demand GCP service
◆ RECOMMENDED GCP MIGRATION ORDER

1. Observability (Cloud Monitoring → OTel stack) — immediate impact
2. Object storage (GCS → MinIO/Backblaze B2) — zero refactoring
3. BigQuery → ClickHouse — strong ROI if volume > 1TB/mo
4. Cloud SQL → Aiven/Neon — pg_dump/restore
5. GKE → k3s — Velero
6. Cloud Functions → Knative
7. Vertex AI → vLLM self-hosted

◆ GCP MIGRATION TOOLS
✅ Velero → backup/restore K8s cross-cluster
✅ gsutil rsync → GCS transfer to S3-compatible destination
✅ BQ Storage API → export BigQuery to Parquet/Arrow
✅ Migrate for Anthos → GCE VM migration to containers
✅ OpenTofu → IaC portable multi-cloud
✅ gcpdiag → audit ressources orphelines GCP
OPS
AZURE · PAGE 1/3 · COMPUTE · NETWORK · STORAGE · SERVERLESS
MICROSOFT AZURE — AKS · NETWORK · BLOB · FUNCTIONS · RESERVATIONS
Indicative estimates based on common use cases
◆ BLOCK 1 · AZURE BLOB STORAGE & DATA TRANSFERHIGH IMPACT
LRS: $0.018/GB · Internet egress: $0.07–0.09/GB · inter-region transfers: $0.02/GB
✅ Archive tier → $0.001/GB storage · rehydration $0.02/GB · 94% reduction vs Hot
✅ Azure CDN in front of Blob → reduces direct requests and Internet egress
✅ Lifecycle Management → automatic archiving after X days without access
✅ MinIO S3-compatible on-premise for non-critical data → zero egress
◆ BLOCK 2 · AKS — Azure Kubernetes ServiceAVERAGE IMPACT
Free control plane · Windows nodes 40% more expensive than Linux · billed on node uptime
✅ Spot Node Pools → 60–90% reduction for non-critical workloads
✅ KEDA → scale-to-zero for event-driven workloads · évite les coûts idle
✅ Linux everywhere possible vs Windows → direct 40% saving
✅ Virtual Nodes (ACI) for bursting → no idle nodes · pay-per-pod
◆ BLOCK 3 · VPN & EXPRESSROUTEAVERAGE IMPACT
ExpressRoute: billed by reserved bandwidth · often over-sized for light hybrid connections
✅ VPN Gateway Standard (~$140/mo) for hybrid connections <500 Mbps · 80–90% reduction vs ExpressRoute
✅ Direct VNet Peering vs Virtual WAN Hub → for simple architectures (2–5 VNets) · avoids Hub fees
✅ Azure Bastion vs VPN for admin access → fixed cost · more secure than VM-based VPN
◆ BLOCK 4 · AZURE RESERVATIONS & SAVINGS PLANSWARNING CONTRACT
⚠ Non-cancellable Savings Plans · early termination fee: 12% + $50,000/yr cap · Capacity Blocks non-refundable
✅ Reserve only on the most stable and predictable resources · keep on-demand for variable resources
✅ Azure Reservations vs Savings Plans → Reservations more flexible on instance types for the same service
✅ Azure Hybrid Benefit → use existing Windows Server / SQL Server licences on Azure · 40–55% reduction
◆ BLOCK 5 · AZURE FUNCTIONS & APP SERVICEAVERAGE IMPACT
Consumption Plan · Premium Plan · Dedicated Plan → often sub-optimally chosen based on load pattern
✅ Consumption Plan → pay-per-execution · ideal for sporadic workloads (<1M executions/mo)
✅ Premium Plan → pre-warmed instances · avoids cold starts · fixed billing · worthwhile for >8h/day activity
✅ Containers on AKS Spot for continuous workloads → more control · cheaper
✅ Knative on AKS → removes Azure Functions dependency · same scale-to-zero model
◆ AZURE HYBRID BENEFIT — OFTEN UNDER-USED

If your organisation holds Windows Server or SQL Server licences with Software Assurance, Azure Hybrid Benefit allows reuse on Azure VMs or AKS. Reduction: 40–55% on Windows VM cost · up to 80% on Azure SQL database. Check systematically before any Windows workload deployment.

OPS
AZURE · PAGE 2/3 · DB · AI · DATA · OBSERVABILITY · CLEANUP
MICROSOFT AZURE — SQL · COSMOS · OPENAI · SYNAPSE · MONITOR · CLEANUP
Indicative estimates based on common use cases
◆ BLOCK 6 · AZURE SQL & COSMOS DBHIGH IMPACT
Azure SQL DTU: difficult to size · Cosmos DB RU: unpredictable cost without precise monitoring
✅ vCore vs DTU → vCore more predictable · better cost/performance for stable workloads
✅ Cosmos DB Autoscale throughput → suited for variable workloads · avoids over-provisioning
✅ Serverless Cosmos DB → for sporadic workloads · billed on usage only
✅ PostgreSQL + Citus (multi-tenant) → complete open-source alternative to Azure SQL
✅ FerretDB (MongoDB on PostgreSQL) → Cosmos DB alternative for MongoDB APIs
◆ BLOCK 7 · AZURE SYNAPSE & DATA FACTORYAVERAGE IMPACT
Data Factory: billed per activity run · can explode on frequent pipelines without optimisation
✅ Pipeline consolidation → group activities to reduce the number of billed runs
✅ Self-hosted Integration Runtime → run on existing machines · eliminates Azure IR fees
✅ Serverless Synapse SQL Pool → billed on queries only · no permanent nodes
✅ Full open-source stack: Apache Airflow (orchestration) + dbt (transformation) + ClickHouse (storage)
◆ BLOCK 8 · AZURE OPENAI & COGNITIVE SERVICESHIGH IMPACT
GPT-4: $30/M input tokens · GPT-4o: $5/M tokens · thousands of $/mo for intensive usage
✅ Caching frequent responses (Redis/Memcached) → 30–60% reduction on repetitive queries
✅ Model distillation → fine-tune a smaller model on outputs of the large one → 90% inference cost reduction
✅ Prompt optimisation → reducing prompt size directly reduces the bill
✅ Llama 3 / Mistral / Phi-3 on Spot GPU + vLLM → 60–90% reduction vs Azure OpenAI
◆ BLOCK 9 · AZURE MONITOR & LOG ANALYTICSAVERAGE IMPACT
Log Analytics ingestion: $2.76/GB · retention beyond 31 days billed · Application Insights expensive at high volume
✅ OpenTelemetry + Grafana + Loki self-managed → 70–90% reduction
✅ Data Collection Rules (DCR) → filter Windows/Linux events before ingestion
✅ Basic Logs tier for low-value logs → $0.60/GB vs $2.76/GB · 8-day retention
✅ Log Analytics Archive tier → $0.03/GB/mo after 90 days · on-demand queries
◆ BLOCK 10 · CLEANUP — Managed Disks · Snapshots · VM Images · Public IPs · NSGs · App RegistrationsIMMEDIATE SAVINGS
🔵 Unattached Managed Disks: billed by type (Standard HDD $0.04/GB · Premium SSD $0.17/GB/mo) even without a VM · identify via: az disk list --query "[?diskState=='Unattached']"
🔵 Orphaned snapshots: snapshots of deleted disks · cost $0.04/GB/mo · monthly audit via Azure Cost Management
🔵 Stale VM images: generalised images unused for 90+ days → retention policy · archive to Azure Shared Image Gallery
🔵 Unassigned Public IPs: $0.0036/h (~$32/yr each) · an IP not attached to an active resource is billed
🔵 Unused NSGs and routes: no direct cost but increase attack surface and maintenance complexity · quarterly audit recommended
🔵 Expired Entra App Registrations: expired certificates and secrets · no direct cost but security risk and technical debt · Microsoft Entra Recommendations for audit
🔵 Stopped (deallocated) VMs: Managed disks continue to be billed · static public IPs too · delete or release attached resources
🔧 Tools: Azure Advisor (Cost tab) · Azure Cost Management + Budgets · AzureHound (IAM/resource audit) · Azure Resource Graph for cross-subscription audit queries
OPS
AZURE · PAGE 3/3 · PROGRESSIVE MIGRATION TO ALTERNATIVES
MICROSOFT AZURE — STEP-BY-STEP MIGRATION STRATEGY
Indicative estimates · Effort: L=Low (days) · M=Medium (weeks) · H=High (months)
◆ AZURE-SPECIFIC WARNING — SAVINGS PLANS & CAPACITY BLOCKS

Azure Savings Plans are non-cancellable (12% termination fee + $50,000/yr cap). Capacity Blocks are non-refundable. Plan migration so commitments are consumed naturally. Never terminate early without first calculating whether termination cost is lower than migration gain.

◆ BLOCK 11 · AZURE MIGRATION STRATEGY → ALTERNATIVES
Service Azure
Alternative
Méthode
Effort
SAVING
Azure Blob Storage
MinIO · Backblaze B2 · Cloudflare R2
azcopy → rsync · S3-compatible SDK → zero refactoring
L
Egress →0
Azure Functions
Knative · OpenFaaS
Same Python/Node/Java runtime · adapt the handler
M
60–80%
Azure SQL
PostgreSQL managed (Aiven · Neon · Supabase)
pg_dump / pg_restore · zero application refactoring
L
30–50%
AKS
k3s · k0s · RKE2 self-managed
Velero backup/restore · identical K8s manifests
M
Free Control plane
Cosmos DB (MongoDB API)
MongoDB Community · FerretDB
Same MongoDB driver → zero refactoring if API compatible
L
40–70%
Azure Monitor / Log Analytics
OTel + Prometheus + Grafana + Loki
OTel Collector replaces Azure Monitor agent
M
70–90%
Azure OpenAI
Llama 3 · Mistral · Phi-3 + vLLM
OpenAI-compatible API → change endpoint URL only
M
60–90%
Azure Synapse / Data Factory
Apache Airflow + dbt + ClickHouse
Airflow DAG rewriting · dbt models
H
50–70%
Azure Cache for Redis
Redis self-managed · KeyDB · Dragonfly
Same Redis protocol → zero refactoring
L
40–60%
Indicative estimates · L=days · M=weeks · H=months · discounts vs. Azure managed on-demand service
◆ RECOMMENDED AZURE MIGRATION ORDER

1. Observability (Azure Monitor → OTel stack) — immediate impact
2. Blob Storage → MinIO/Backblaze B2 — zero refactoring
3. Azure SQL → managed PostgreSQL (Aiven/Neon) — pg_dump/restore
4. Azure Functions → Knative — adapt the handler
5. AKS → k3s — Velero for workloads
6. Cosmos DB → MongoDB Community — compatible API
7. Azure OpenAI → vLLM self-hosted — adapt endpoint

◆ AZURE MIGRATION TOOLS
✅ Velero → backup/restore K8s cross-cluster
✅ azcopy → Blob transfer to S3-compatible
✅ Azure Migrate → VM assessment and migration
✅ AzureHound → IAM audit and orphaned resources
✅ OpenTofu → IaC portable multi-cloud
✅ Azure Resource Graph → cross-subscription audit queries
OPS
REFERENCE OPEN-SOURCE STACK — CROSS-CUTTING SYNTHESIS AWS · GCP · AZURE
OPEN-SOURCE ALTERNATIVES BY CATEGORY — PORTABILITY & INDEPENDENCE
Indicative estimates · Portability: F=Full · P=Partial · Effort: L=Low · M=Medium · H=High
◆ TABLE 1 · OBSERVABILITY — Full replacement of CloudWatch / Cloud Monitoring / Azure MonitorSAVING 70–90%
Composant
Role
Replaces
Portability
OpenTelemetry
Instrumentation & collect
CloudWatch Agent · GCP Agent · Azure Monitor Agent
T
Prometheus
Metrics
CloudWatch Metrics · Cloud Monitoring · Azure Metrics
T
Grafana
Dashboards & alerts
CloudWatch Dashboards · Google Cloud Dashboards · Azure Workbooks
T
Loki
Logs
CloudWatch Logs · Cloud Logging · Log Analytics
T
Tempo
Distributed traces
AWS X-Ray · Cloud Trace · Azure Application Insights
T
◆ TABLE 2 · OBJECT STORAGETOTAL PORTABILITY
Tool
Replaces
Effort
MinIO
S3 · GCS · Blob
L
Ceph / Rook
S3 · GCS · Blob (production)
M
Scaleway / OVHcloud S3
S3 · GCS · Blob (managé EU)
L
Standard S3 SDK (boto3 · minio-py) → zero application refactoring
◆ TABLE 3 · DATABASESTOTAL PORTABILITY
Tool
Replaces
Effort
PostgreSQL + PgBouncer
RDS · Cloud SQL · Azure SQL
L
ClickHouse
BigQuery · Redshift · Synapse
M
MongoDB Community
DocumentDB · Cosmos DB
L
Redis / KeyDB / Dragonfly
ElastiCache · Memorystore · Cache for Redis
L
◆ TABLE 4 · ORCHESTRATION & K8s PORTABILITY
Tool
Role
Effort
k3s / k0s
Lightweight K8s · replaces EKS/GKE/AKS
M
Velero
K8s cross-cluster backup/restore
L
OpenTofu
Portable IaC (Terraform BSL fork)
L
Karpenter / KEDA
Intelligent Autoscaling K8s
M
◆ TABLE 5 · OPEN-SOURCE AI & MLSAVING 60–90%
Tool
Replaces
Effort
vLLM
Bedrock · Vertex AI · Azure OpenAI
M
Ollama
Dev/test local · zéro coût cloud
L
Hugging Face + Ray Serve
SageMaker · Vertex AI · ML Studio
H
MLflow
SageMaker Experiments · Vertex Experiments
L
◆ TABLE 6 · SERVERLESS & EVENT-DRIVEN
Tool
Replaces
Portability
Effort
OpenFaaS · Knative
Lambda · Cloud Functions · Azure Functions
Total after migration
M
Apache Kafka · Redpanda
MSK · Pub/Sub · Event Hub · Event Bridge
Total (same protocol)
M
Apache Airflow
Step Functions · Cloud Workflows · Logic Apps
Total
M
OPS
QUICK REFERENCE TABLES — AWS · GCP · AZURE
SUMMARY BY HYPERSCALER — LINE ITEMS · ALTERNATIVES · REDUCTIONS
Indicative estimates based on common use cases · Économies réelles variables selon architecture et volume
◆ AWS — SUMMARY BY IMPACT ORDER
Item
Main alternative
SAVING est.
Effort
NAT Gateway
NAT Instance + VPC Endpoints
70–85%
L
EC2 Savings Plans
Spot + Graviton + Compute Optimizer
20–90%
M
RDS
Aurora Serverless v2 · PostgreSQL EC2 Spot
30–60%
M
CloudWatch Logs
OTel + Grafana + Loki
70–90%
M
EKS (multi-clusters)
Consolidation + Karpenter + Spot nodes
40–80%
M
Cleaning (EBS · AMIs · EIPs)
aws-nuke · Trusted Advisor
Immediate
L
◆ GCP — SUMMARY BY IMPACT ORDER
Item
Main alternative
SAVING est.
Effort
BigQuery (queries)
Partitioning + Clustering + ClickHouse
80–95% (scans)
L–M
Compute Engine CUDs
Spot VMs + Custom Machine Types
60–91%
L
Cloud SQL
AlloyDB · PostgreSQL on Spot + PgBouncer
30–70%
M
Cloud Monitoring/Logging
OTel + Prometheus + Grafana + Loki
70–90%
M
Vertex AI (inference)
vLLM + open-source models on Spot
60–90%
M
Cleaning (Disks · Snapshots · Images)
GCP Recommender · gcpdiag
Immediate
L
◆ AZURE — SUMMARY BY IMPACT ORDER
Item
Main alternative
SAVING est.
Effort
Azure OpenAI
vLLM + Llama 3 / Mistral on Spot
60–90%
M
Log Analytics
OTel + Grafana + Loki + Basic Logs tier
70–90%
M
ExpressRoute
Standard VPN Gateway
80–90%
L
Azure SQL / Cosmos DB
PostgreSQL + Citus · FerretDB
30–70%
M
Azure Hybrid Benefit
Use existing Windows/SQL licenses
40–55%
L
Cleaning (Disks · IPs · VM Images)
Azure Advisor · AzureHound
Immediate
L
All estimates are indicative and based on common use cases. Actual savings vary depending on architecture, region, volume, and usage level.
This document is purely technical. It contains no legal references or political dimension.
Amine RAITI · Infrastructure Architect & SRE · Paris · Public document · CC BY-NC-SA 4.0
AI Powered by Amine — AI is an amplifier of ideas and forms, not the source.