Skip to content
Li ZhenXi, home page
Building IoT platform

Building IoT platformPrimustech, 2026 · Case study

Cutting cloud spend by ~15%

Measured first, then cut monitoring, database and compute, with every trade-off written down.

cloud spend cut, with no alert dropped
~15%
orphaned Kafka topics reaped, 86% of all topics
914
samples per scrape from the Kafka exporter
10,386 → 2,891

A small working model of the real system. Press the buttons.

in use orphaned0 / 914 reaped

The problem

Nobody had measured where the money went. Managed Prometheus alone was about US$106 a month, the third-largest line item, and climbing with no matching growth in traffic.

What I did

  1. 1

    Traced the metric bill to 914 orphaned Kafka topics, 86% of all topics, and shipped a scheduled reaper. Samples per scrape from Kafka fell from 10,386 to 2,891.

  2. 2

    Dropped three metric packages that no alert or dashboard used, a 40% cut in samples per scrape, and kept cAdvisor because three memory alerts depend on it.

  3. 3

    Right-sized Cloud SQL from 4 vCPU/16 GiB to 2 vCPU/12 GiB and moved it from regional HA to zonal, with the recovery trade-off documented.

  4. 4

    Cut Core API pod requests from 1 CPU/4 GiB to 0.5 CPU/3 GiB so pods pack onto fewer nodes, and retired a replaced ingestion lane end to end.

The result

Cut cloud spend by about 15%, without dropping a single alert.

Stack

  • Managed Prometheus
  • Kafka
  • Kubernetes CronJob
  • Cloud SQL
  • GKE autoscaling
  • Terraform

Go deeper