SOFMENT // TELEMETRY KERNEL v4.8SOC-2 TYPE II VERIFIED
Sofment Brand Emblem

Integrated Digital Solutions • High-Scale Reality

SYSTEM SYNCHRONIZATION
BUFFERING PRODUCTION ARSENAL...
000%
TERMINAL INGRESS STREAM
LATENCY: 8ms
ARCHITECTURAL CASE STUDY9 min read3,892 Reads

Ingesting 1.2M Events/Sec: Real-Time Fleet IoT Telemetry Engine with Go, Apache Kafka, and ClickHouse

Architectural blueprint for ingesting, querying, and visualizing millions of vehicle GPS pings with sub-50ms analytical latency.

Vikram R.

Vikram R.Verified Architect

Principal Cloud Infrastructure Architect, Sofment•2026-06-20
Ingesting 1.2M Events/Sec: Real-Time Fleet IoT Telemetry Engine with Go, Apache Kafka, and ClickHouse
FIG 1.0 // ARCHITECTURE BLUEPRINTCloud & DevOps
DOMAIN

Cloud & DevOps

VERIFICATION

Production Tested

RIGOR LEVEL

Lead Architects & CTOs

ESTIMATED TIME

9 min read

Executive Summary & Architectural Takeaways

Learn how we engineered a high-throughput fleet telemetry pipeline capable of processing 1.2 million geospatial events per second using Go microservices, Kafka partitioning, and ClickHouse columnar storage.

The 1.2M Events/Sec Ingestion Challenge #



Fleet management and smart vehicle platforms generate continuous streams of high-frequency GPS, engine diagnostics (OBD-II), fuel temperature, and speed telematics. Traditional relational databases crumble under this write velocity due to transaction log lock contention and B-Tree index rebalancing.

To sustain continuous **1.2 million events per second write throughput** while supporting sub-50ms fleet analytics dashboards, we implemented a three-tier architecture:

1. **Edge Ingestion Gateway (Go):** Stateless WebSocket and MQTT listener clusters terminating connections and parsing binary protocol buffers. 2. **Distributed Message Backbone (Apache Kafka):** 24-partition topic cluster grouped by `device_region_id` with LZ4 compression. 3. **Columnar Analytical Store (ClickHouse):** Sharded `ReplicatedReplacingMergeTree` cluster with memory buffers.

---

Zero-Loss Kafka Partitioning & Buffer Architecture #



The Go ingestion microservice batches incoming telemetry frames in memory buffers for 100ms before publishing vectorized payloads to Kafka:

GO SNIPPET
PRODUCTION SPEC
package main

import ( "context" "time" "github.com/segmentio/kafka-go" )

type TelemetryBatcher struct { writer *kafka.Writer buffer chan kafka.Message }

func (b *TelemetryBatcher) FlushLoop(ctx context.Context) { ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop() var batch []kafka.Message

for { select { case msg := <-b.buffer: batch = append(batch, msg) if len(batch) >= 5000 { _ = b.writer.WriteMessages(ctx, batch...) batch = batch[:0] } case <-ticker.C: if len(batch) > 0 { _ = b.writer.WriteMessages(ctx, batch...) batch = batch[:0] } case <-ctx.Done(): return } } }


---

ClickHouse AggregatingMergeTree Table Optimization #



ClickHouse stores data column-by-column on disk, enabling up to 90% compression ratios and multi-gigabyte per second sequential scan speeds:

SQL SNIPPET
PRODUCTION SPEC
CREATE TABLE default.vehicle_telemetry_raw (
    tenant_id UUID,
    vehicle_id LowCardinality(String),
    timestamp DateTime64(3, 'UTC'),
    latitude Float64,
    longitude Float64,
    speed_kmh Float32,
    fuel_level_pct UInt8,
    engine_temp_c Int16
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/telemetry', '{replica}')
PARTITION BY toYYYYMM(timestamp)
ORDER BY (tenant_id, vehicle_id, timestamp);


This architecture powers live geofencing alerts, idle-time analytics, and route playback across 45,000 active commercial trucks with zero server strain.
TOPICS & SYSTEM PRIMITIVES
#IoT#Kafka#ClickHouse#Go#Distributed Systems#Telemetry
Share with engineers:
Vikram R.

Vikram R.

PRINCIPAL AUTHOR

Principal Cloud Infrastructure Architect, Sofment

Part of the Sofment Principal Architecture pod specializing in high-concurrency cloud systems, distributed databases, HL7 integrations, and enterprise AI workflows.

Recommended Engineering Reads

More architectural blueprints from our solutions engineering pod

View All Blueprints
Scroll to Content(0%)