Architecture
The broker runs an ingestion pipeline: CLI connectors pull from multiple providers; the ingestion service upserts data and normalizes prices to EUR via FX rates. The data model is Provider → Region → InstanceType → Price (append-only) plus FxRate, plus cost rates for TCO. The engine supports TCO (Total Cost of Ownership): when you provide data source and estimated egress, total cost includes egress, storage, public IP, OS license, and cross-AZ. Cost rates (egress, storage, public IP, OS license) are ingested via API or config. The cost recommendation engine filters by constraints (vCPU, RAM, arch, region, max price, allowed providers), scores candidates (price + fit or multi-criteria), and returns a ranked list with a transparent explain block. Cloudburst Autoscaler uses the broker by calling POST /api/recommendations.
graph TB
subgraph Ingestion ["Ingestion Pipeline"]
CLI["make ingest-* (CLI)"]
CON["Connectors (multiple providers: GCP, AWS, Hetzner, Scaleway, …)"]
SVC["Ingestion Service (upsert + FX)"]
CLI --> CON --> SVC
end
subgraph Core ["CloudBroker Core"]
DB[("PostgreSQL: Providers, Regions, InstanceTypes, Prices, FxRates, EgressRates, StorageRates, PublicIpRates, OsLicenseRates")]
REC["Recommendation Engine (scoring + ranking)"]
ANA["Price Analytics (changes + trends)"]
end
subgraph API ["FastAPI /api"]
R1["/recommendations"]
R2["/providers, /regions, /instance-types, /prices"]
R3["/price-analytics: /changes, /trends"]
R4["/metrics (Prometheus)"]
end
SVC --> DB
DB --> REC
DB --> ANA
REC --> R1
DB --> R2
ANA --> R3
CB["Cloudburst Autoscaler (K8s controller)"] -->|"POST /api/recommendations"| R1