India’s Leading Domain & Web Hosting Provider
Fleet telematics provider cuts GPS ingestion lag from 9 minutes to under 20 seconds
Telematics SaaS tracking 1.8 lakh trucks and buses, 160 employees · Pan-India, operations in Gurugram · 7 weeks
As-is situation
Vehicle devices sent GPS and CAN-bus pings every 10 seconds over MQTT to brokers on Compute Engine, which published to Pub/Sub. A Dataflow streaming pipeline enriched pings with geofences and wrote them to Bigtable for live maps and BigQuery for reports. During morning dispatch peaks, live maps fell up to nine minutes behind, and fleet operators complained that geofence breach alerts arrived after drivers had left the zone. The team monitored VM CPU and Dataflow job status only; nobody watched end-to-end freshness, so lag was discovered by customer calls each time.
- Live map lag of up to 9 minutes at 7 to 10 am dispatch peaks
- No freshness metric from device timestamp to Bigtable write
- Dataflow autoscaling hidden behind a single job-running status check
- Hot Bigtable row keys suspected but never measured
Selected Google Cloud services and architecture
NTSPL defined a freshness SLI: 99 percent of pings visible in Bigtable within 30 seconds of device time. The Dataflow pipeline emits a custom distribution metric of event-to-write latency, and alerts watch Pub/Sub oldest unacknowledged message age, Dataflow data freshness and system lag, and Bigtable CPU per cluster. OpenTelemetry spans propagated through Pub/Sub attributes showed 70 percent of lag in a geofence lookup calling Cloud SQL per ping. That lookup moved to an in-memory side input refreshed every five minutes. Key Visualizer exposed hot row keys by fleet ID, fixed by reversing the vehicle ID prefix. Dataflow max workers and Streaming Engine settings were tuned against the new metric.
Implementation approach
Measured results
Operational improvements
- On-call is paged on freshness burn rate, not on individual VM CPU spikes
- Every new pipeline stage must emit the latency metric before it can be deployed
- Key Visualizer is reviewed monthly for new hot-key patterns as large fleets onboard
Cost considerations
Custom metrics from Dataflow added a small monthly Cloud Monitoring charge, kept low by recording a distribution rather than per-vehicle series. Trace sampling was set to 1 percent of pings because volume is high. The larger saving came from fewer Dataflow workers and a dropped Cloud SQL replica.
Return on investment
Halving Dataflow peak workers and removing a Cloud SQL read replica used only by geofence lookups saved an indicative INR 4.5 to 5.5 lakh per month. Two large logistics customers withdrew contractual penalty notices tied to alert delays, protecting about INR 1.2 crore in annual contract value.