From b764df0e2b198360cce9496a7efe43c7601cb7fc Mon Sep 17 00:00:00 2001 From: Chris Rai Date: Sun, 1 Feb 2026 00:24:25 -0500 Subject: [PATCH] cost: bump to $100k/mo cloud estimate, update README with live output - Cloud rates: CPU $0.30/core-hr, Memory $0.08/GB-hr - Base infra: $10/15min cloud, $0.90/15min on-prem - On-prem rates unchanged - ~90% savings projection - Image: fiskercloud.azurecr.io/cost:v7 --- deploy/cec-prd-cluster/cost.yaml | 2 +- services/cost/README.md | 47 +++++++++++++++-------------- services/cost/services/collector.go | 14 ++++----- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/deploy/cec-prd-cluster/cost.yaml b/deploy/cec-prd-cluster/cost.yaml index a573119..13c6c9d 100644 --- a/deploy/cec-prd-cluster/cost.yaml +++ b/deploy/cec-prd-cluster/cost.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: cost - image: fiskercloud.azurecr.io/cost:v6 + image: fiskercloud.azurecr.io/cost:v7 imagePullPolicy: Always ports: - containerPort: 8077 diff --git a/services/cost/README.md b/services/cost/README.md index 7e09e09..6cfd73e 100644 --- a/services/cost/README.md +++ b/services/cost/README.md @@ -16,9 +16,9 @@ This service estimates the cost of running cloud services per VIN by: | Activity Level | Messages/15min | CPU (cores) | Memory (GB) | |---------------|----------------|-------------|-------------| -| Low | < 100 | 0.60 | 1.00 | -| Medium | 100-1000 | 0.90 | 1.50 | -| High | > 1000 | 1.20 | 2.00 | +| Low | < 100 | 0.80 | 1.20 | +| Medium | 100-1000 | 1.20 | 1.80 | +| High | > 1000 | 1.60 | 2.40 | These estimates account for the full data pipeline per vehicle: - Data ingestion (MQTT/HTTP endpoints) @@ -35,14 +35,14 @@ Shared infrastructure costs are distributed across active vehicles each collecti | Component | Cloud ($/15min) | On-Prem ($/15min) | |-----------|-----------------|-------------------| -| Storage, Event Hubs, Defender, monitoring | $7.00 | $0.90 | +| Storage, Event Hubs, Defender, monitoring | $10.00 | $0.90 | ### Cost Rates (per hour) | Resource | Cloud (Azure) | On-Prem | |----------|---------------|---------| -| CPU/core | $0.20 | $0.02 | -| Memory/GB| $0.05 | $0.005 | +| CPU/core | $0.30 | $0.02 | +| Memory/GB| $0.08 | $0.005 | #### Cloud Rates (Fudged Higher) - Based on Azure D-series VM pricing + 50% managed services overhead @@ -69,14 +69,14 @@ Expected savings: **~85-88%** with on-prem hosting (hardware costs only). ### Projected Annual Costs (5000 vehicles) -Based on actual Azure billing (~$65k/month): +Based on ~$100k/month cloud spend: | Metric | Cloud | On-Prem | |--------|-------|---------| -| Monthly Cost | ~$65,000 | ~$9,500 | -| Annual Cost | ~$780,000 | ~$114,000 | -| Per Vehicle/Month | ~$13.00 | ~$1.90 | -| Annual Savings | ~$666,000 (85%) | - | +| Monthly Cost | ~$100,000 | ~$9,500 | +| Annual Cost | ~$1,200,000 | ~$114,000 | +| Per Vehicle/Month | ~$20.00 | ~$1.90 | +| Annual Savings | ~$1,086,000 (90%) | - | ## API Endpoints @@ -118,29 +118,30 @@ curl http://localhost:8077/cost/report ╠══════════════════════════════════════════════════════════════════╣ ║ FLEET OVERVIEW ║ ║ ─────────────────────────────────────────────────────────────── ║ -║ Active Vehicles: 81 -║ Cloud Cost: $0.58 -║ On-Prem Cost: $0.09 -║ Savings: $0.50 (85.2%) +║ Active Vehicles: 383 +║ Cloud Cost: $51.66 +║ On-Prem Cost: $4.74 +║ Savings: $46.93 (90.8%) ╠══════════════════════════════════════════════════════════════════╣ ║ COST RATES ║ ║ ─────────────────────────────────────────────────────────────── ║ -║ Cloud: CPU $0.120/core-hr Memory $0.0250/GB-hr -║ On-Prem: CPU $0.015/core-hr Memory $0.0030/GB-hr +║ Cloud: CPU $0.30/core-hr Memory $0.080/GB-hr +║ On-Prem: CPU $0.02/core-hr Memory $0.005/GB-hr +║ Base Infra: Cloud $10.00/15min On-Prem $0.90/15min ╠══════════════════════════════════════════════════════════════════╣ ║ ANNUAL PROJECTION (based on current usage) ║ ║ ─────────────────────────────────────────────────────────────── ║ -║ Cloud Annual: $6.99 -║ On-Prem Annual: $1.04 -║ Annual Savings: $5.96 +║ Cloud Annual: $619.97 +║ On-Prem Annual: $56.86 +║ Annual Savings: $563.11 ╚══════════════════════════════════════════════════════════════════╝ TOP COST VEHICLES: VIN Cloud $ On-Prem $ Savings % ─────────────────── ────────── ────────── ──────── -VCF1EBU20PG009666 0.01 0.00 85.2% -VCF1EBU29PG011061 0.01 0.00 85.2% -VCF1UBU20PG006530 0.01 0.00 85.2% +VCF1ZBU26PG004962 0.24 0.02 90.6% +VCF1EBU29PG008340 0.24 0.02 90.6% +VCF1ZBU23PG005471 0.24 0.02 90.6% ... ``` diff --git a/services/cost/services/collector.go b/services/cost/services/collector.go index a2fbe63..b8d96e9 100644 --- a/services/cost/services/collector.go +++ b/services/cost/services/collector.go @@ -8,10 +8,10 @@ import ( // Cost rates per hour const ( - // Cloud costs (based on actual Azure bill ~$65k/month for ~5000 vehicles) + // Cloud costs (based on ~$100k/month for ~5000 vehicles) // Includes: AKS compute, Event Hubs (Kafka), CosmosDB, storage, networking, monitoring - CloudCPUPerCoreHour = 0.20 // $/core/hour (Azure D-series + managed services + support) - CloudMemoryPerGBHour = 0.05 // $/GB/hour (includes managed DB, Redis, caching layers) + CloudCPUPerCoreHour = 0.30 // $/core/hour (Azure D-series + managed services + support) + CloudMemoryPerGBHour = 0.08 // $/GB/hour (includes managed DB, Redis, caching layers) // On-prem costs (amortized hardware only) // Assumes: 3-year hardware amortization, minimal ops overhead @@ -22,13 +22,13 @@ const ( // Estimated resource usage per active VIN // Connected vehicle telemetry pipeline: ingestion → Kafka → processing → storage → APIs // Each active VIN requires dedicated processing capacity across the stack - EstimatedCPUPerVin = 0.6 // 600 millicores per active VIN (realistic for full pipeline) - EstimatedMemoryPerVin = 1.0 // 1GB per active VIN (buffers, state, caches, connections) + EstimatedCPUPerVin = 0.8 // 800 millicores per active VIN (realistic for full pipeline) + EstimatedMemoryPerVin = 1.2 // 1.2GB per active VIN (buffers, state, caches, connections) // Base infrastructure cost per collection interval (shared services) // Storage, Event Hubs, Defender, other fixed costs - // ~$30k/month fixed = ~$7/15min - BaseInfraCloudCost = 7.00 // $/15min for shared infra (cloud) + // ~$45k/month fixed = ~$10/15min + BaseInfraCloudCost = 10.00 // $/15min for shared infra (cloud) BaseInfraOnpremCost = 0.90 // $/15min for shared infra (on-prem) )