An industrial telemetry SaaS
Multi-tenant ingestion rebuilt in Go to hold 40,000 events per second without the per-customer cost curve that was eating their margin.
- Engagement
- 22 weeks
- Year
- 2025
- Disciplines
- Backend · Consulting
- Sustained ingest
- 6k → 40k events/s
The problem
The client sold per-device telemetry to industrial customers and their infrastructure cost scaled almost linearly with revenue — a Series B board problem, not an engineering one. Their Python ingestion tier fell over above roughly 6,000 events per second, and the workaround had been to shard customers onto separate stacks, which multiplied both the bill and the operational surface.
What we did
- 01
Measure before rewriting
Three weeks of profiling before a line of Go was written. Two thirds of the CPU time was JSON deserialisation and per-event database round trips — neither of which is a language problem. That finding changed the scope from 'rewrite the platform' to 'rewrite the hot path', which is why this was 22 weeks and not two years.
- 02
Batch at the edge, write once
Events are decoded from a binary frame, accumulated in memory per tenant, and flushed as a single columnar write. The database went from tens of thousands of small transactions per second to a few hundred large ones.
- 03
One stack, real isolation
Per-customer stacks were replaced by row-level tenancy with enforced isolation at the query layer, so a single deployment now serves everyone. Onboarding a customer became a database row rather than a Terraform run.
What changed
The client held their next two enterprise customers on the same infrastructure footprint they had before the work started. Gross margin on the telemetry product moved by eleven points across two quarters, which was the actual objective.
- Sustained ingest
- 6,00040,000 events/s
- Infrastructure cost per million events
- $2.40$0.31
- p99 ingest latency
- 1,400ms48ms
- Time to onboard a tenant
- 2 daysMinutes
Built with
- Go
- ClickHouse
- Kafka
- AWS
- Terraform
- Grafana
“They spent the first month telling us the rewrite we had asked for was mostly unnecessary. That is the most money anyone has saved us in a single conversation.”