Skip to content
Li ZhenXi, home page
Building IoT platform

The building IoT platform

Collects live data from building systems (sensors, HVAC, meters) and serves the dashboards and alarms facility teams use. I run it on GKE at Primustech. First what I shipped on it, each as a small working model; then the platform from the inside: how traffic moves, what I alert on, and where the money went.

Primustech · Kubernetes on GKE

What I shipped, as working models

Building IoT platformPrimustech, 2026

One VM to a GKE platform

Moved a live building-operations platform off a single Docker Compose VM and onto Kubernetes.

One VM, Docker Compose, one in-memory queue

Core APIMessage queueCoordinationMQTT brokerPostgreSQL

One failure domain, deployed by hand, and a queue that could not be shared.

Read the case
Building IoT platformPrimustech, 2026

A pipeline where failed merges never deploy

I own the Cloud Build delivery pipeline: build once, promote by digest, approve before release.

  1. PR checks
  2. Build image
  3. CVE scan
  4. Integration tests
  5. Approval
  6. Promote digest
  7. Deploy to GKE

A simulation of the real release gates.

Read the case
Building IoT platformPrimustech, 2026

Cutting cloud spend by ~15%

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

in use orphaned0 / 914 reaped
Read the case
Building IoT platformPrimustech, 2026

Alerts that mean something

Dashboards and alerts built around how this system actually fails.

zk-0

leader

zk-1

follower

zk-2

follower

Quorum held, 3 of 3 up

All quiet.

Read the case
Building IoT platformPrimustech, 2026

Remote control that fails safe

The platform could watch a building's air-conditioning. Letting it switch units on and off took a different kind of care.

control bridge

dry run

commands this hour 0/6

air-conditioning unit

26 °C from the plant's readback

selector auto

DRY_RUN=
24 °C
  1. Set DRY_RUN to "false" to arm the lane, then send a setpoint. Try the typo too.
Read the case
Building IoT platformPrimustech, 2026

Changing a live cluster in steps that can't break it

Security and reliability changes to a running platform, each split so that no single step can take it down, and rehearsed first.

  • coreno auth
  • rule engineno auth
  • http transportno auth
  • mqtt transportno auth

Cache

open

No password anywhere

The cache accepts any client inside the cluster. Flip a switch to start the change.

Read the case
Building IoT platform

Inside the IoT platform

The building IoT platform I run on GKE: how traffic moves through it, what I alert on and why, and where the money went.

Try being on call: a simulated incident on this platform

How internet traffic reaches the cluster: load balancer, WAF, ingress, Services, pods and the database.

  1. 1

    BrowserHTTPS 443

    One public hostname. Any other host, or the raw IP, gets a 404 by design.

  2. 2

    Global HTTPS load balanceranycast IP

    TLS ends here on a reserved global IP with a Google-managed certificate.

  3. 3

    Cloud ArmorWAF

    OWASP CRS rules plus a login throttle, tuned per route so legitimate traffic passes, with auth and rate limits behind them.

  4. 4

    GKE IngressL7 paths

    Path routing sends the device API, the REST and WebSocket API, and the web UI to separate Services.

  5. 5

    Service to podsClusterIP

    Core API pods are spread across three zones and across nodes, so losing a zone costs a third of capacity, not all of it.

  6. 6

    Core API to Cloud SQLprivate IP

    A Cloud SQL Auth Proxy sidecar connects over private service access using Workload Identity: no key files, no password on the wire.