cost service: update estimates from migration plan v1.1

- Platform base: 80 cores / 544GB RAM (from migration plan)
- Cloud rates: $0.35/core-hr, $0.10/GB-hr, $17/15min managed services
- On-prem rates: $0.015/core-hr, $0.004/GB-hr, $1.50/15min
- Based on ~$1M/year Azure spend, ~92% savings with on-prem
- Updated README with migration plan references
This commit is contained in:
Chris Rai
2026-02-05 10:30:09 -05:00
parent c48ae896a4
commit 27fe5af164
4 changed files with 38 additions and 39 deletions

View File

@@ -24,18 +24,14 @@ Whether you have 100 vehicles or 100,000, you still need Kafka, databases, and g
### Platform Base Resources (Fixed)
What it takes to run the cloud services platform:
What it takes to run the cloud services platform (from migration plan v1.1):
| Component | CPU (cores) | Memory (GB) | Notes |
|-----------|-------------|-------------|-------|
| Kafka brokers | 32 | 128 | 3-node cluster |
| ClickHouse | 64 | 256 | 3 shards for HA |
| MongoDB | 16 | 128 | Replica set |
| Redis | 16 | 128 | Cluster mode |
| PostgreSQL | 32 | 128 | Primary + replicas |
| Gateway services | 8 | 64 | API gateway, auth |
| Monitoring/logging | 8 | 64 | Prometheus, Grafana, Loki |
| **Total Platform Base** | **176** | **896** | |
| VM 1-4: Core Services | 16 | 64 | Kafka, OTA, Valet, Auth/APIs |
| VM 5: Analytics Primary | 32 | 256 | ClickHouse, Ditto, Beacon, Jetfire |
| VM 6: Analytics Secondary | 32 | 256 | Optimus, Cargo, Vehicle Analytics |
| **Total Platform Base** | **80** | **544** | Based on migration plan |
### Per-VIN Resources (Marginal)
@@ -51,19 +47,19 @@ Incremental resources needed for each additional connected vehicle:
| Resource | Cloud (Azure) | On-Prem/Bare Metal |
|----------|---------------|-------------------|
| CPU/core-hour | $0.30 | $0.02 |
| Memory/GB-hour | $0.08 | $0.005 |
| Managed Services/15min | $10.00 | $2.50 |
| CPU/core-hour | $0.35 | $0.015 |
| Memory/GB-hour | $0.10 | $0.004 |
| Managed Services/15min | $17.00 | $1.50 |
#### Why On-Prem is ~90% Cheaper
- **Platform base**: Same hardware, but cloud charges ~15x more for managed services
- **Per-VIN compute**: Cloud VMs cost ~15x more than amortized bare metal
- **Managed services**: Event Hubs, CosmosDB, etc. have significant markup vs self-hosted equivalents
#### Why On-Prem is ~90-95% Cheaper
- **Platform base**: Same workload, but cloud charges ~20x more for managed services
- **Per-VIN compute**: Cloud VMs cost ~20x more than amortized bare metal
- **Managed services**: Event Hubs, CosmosDB, Azure DB for PostgreSQL have significant markup vs self-hosted
### Savings Calculation
```
Platform Base Cost = (176 cores × rate + 896 GB × rate) × hours
Platform Base Cost = (80 cores × rate + 544 GB × rate) × hours
Per-VIN Cost = (0.05 cores × rate + 0.08 GB × rate) × hours × activity_multiplier
Total Cost = Platform Base + (Per-VIN × VIN count) + Managed Services
@@ -73,18 +69,17 @@ Savings = Cloud Cost - On-Prem Cost
Savings % = (Savings / Cloud Cost) × 100
```
Expected savings: **~90%** with on-prem/bare metal hosting.
Expected savings: **~90-95%** with on-prem/bare metal hosting.
### Projected Annual Costs (5000 vehicles)
### Projected Annual Costs
Based on ~$100k/month cloud spend:
Based on ~$1M/year Azure spend (migration plan v1.1):
| Metric | Cloud | On-Prem |
|--------|-------|---------|
| 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%) | - |
| Monthly Cost | ~$83,000 | ~$7,000 |
| Annual Cost | ~$1,000,000 | ~$84,000 |
| Annual Savings | ~$916,000 (92%) | - |
## API Endpoints