Real-Time Ride-Hailing Architecture: Executive Summary

Answer-first: Real-time ride-hailing platforms combine HTTP/3 gRPC stream ingestion for driver GPS telemetry, Uber H3 hexagonal spatial indexing in Redis RAM, Apache Kafka/Redpanda event streaming, and DISCO global assignment matching engines to dispatch rides in under 2 seconds. Key Takeaways: Telemetry Scale: Ingest driver GPS coordinates every 4 seconds using Extended Kalman Filters and binary gRPC Protobuf streams over HTTP/3 QUIC. Spatial Pre-filtering: Index driver positions using Uber H3 Resolution 8 cells (~0.74 km²), isolating nearest candidates in <10ms. Global Matching Optimization: DISCO batched matching aggregates ride requests every 2-5 seconds, solving bipartite graph assignment problems for minimal ETA. What You’ll Learn: ...

May 6, 2026 · 9 min · Lê Tuấn Anh

Ride-Hailing GPS Location Ingestion Pipeline in Go

Prerequisite: Before reading this part, review the Executive Summary. GPS Ingestion at Scale: gRPC Streaming, MQTT & Kalman Filter Answer-first: High-throughput location ingestion processes over 1 million GPS updates per second by using binary gRPC streams or MQTT over persistent TCP/QUIC connections. Devices run Kalman filters and dead-reckoning interpolation to clean telemetry noise before publishing updates to Apache Kafka and Redis. Key Takeaways: Protocol Overhead: Replacing HTTP REST with gRPC Protobuf binary framing (vtproto) reduces packet overhead from 800 bytes to 40 bytes per GPS update. Noise Reduction: Kalman filters apply prediction-correction matrix equations directly on handset sensors to eliminate urban canyon GPS reflections. Batching Savings: Aggregating 3-5 telemetry points into single gRPC frames saves up to 67% of mobile radio transmission energy. What You’ll Learn: ...

May 6, 2026 · 10 min · Lê Tuấn Anh

Uber H3 Geospatial Indexing: Redis Driver Discovery

Prerequisite: Familiarity with the concepts introduced in Part 1 — Location Ingestion. Review it first if the terminology in this part is unfamiliar. Answer-first: Uber and Grab find the nearest available driver in under 100ms by dividing the Earth’s surface into hexagonal cells (H3 index at Resolution 8, each ~0.74 km²). Instead of calculating distance to every driver, they look up only the 7 cells nearest to the rider — reducing millions of comparisons to dozens. ...

May 6, 2026 · 12 min · Lê Tuấn Anh

Part 5: Route Visualization UI with Mapbox & Deck.gl

Answer-first: High-density geospatial rendering (100,000+ telemetry vectors) requires offloading coordinate math from the browser DOM to WebGL GPU buffers via Deck.gl and Mapbox overlays. Using Deck.gl’s DataFilterExtension updates GPU uniforms in 60 FPS requestAnimationFrame loops without mutating JavaScript heap allocations. Prerequisite: Before reading this part, review Part 4: Golang API & Microservices Integration. Part 5: Route Visualization UI with Mapbox & Deck.gl Answer-first: High-density geospatial rendering (100,000+ telemetry vectors) requires offloading coordinate math from the browser DOM to WebGL GPU buffers via Deck.gl and Mapbox overlays. Using Deck.gl’s DataFilterExtension updates GPU uniforms in 60 FPS requestAnimationFrame loops without mutating JavaScript heap allocations. ...

June 14, 2026 · 10 min · Lê Tuấn Anh

Part 3: Spatial Indexing — Uber H3, PostGIS & Redis GEO

Answer-first: Spatial indexing serves as a high-performance pre-filtering layer that prevents heavy routing engines from collapsing under load. By using Uber H3 hexagonal cells and Redis GEO to narrow down 10,000 active drivers to the 50 closest candidates in RAM (<2ms), systems reduce routing engine CPU overhead by up to 95%. Prerequisite: Before reading this part, review Part 2: Zero to Hero Environment Setup. Part 3: Spatial Indexing — Uber H3, PostGIS & Redis GEO Answer-first: Spatial indexing serves as a high-performance pre-filtering layer that prevents heavy routing engines from collapsing under load. By using Uber H3 hexagonal cells and Redis GEO to narrow down 10,000 active drivers to the 50 closest candidates in RAM (<2ms), systems reduce routing engine CPU overhead by up to 95%. ...

June 14, 2026 · 8 min · Lê Tuấn Anh

Real-Time Ride-Hailing Architecture: Uber & Grab Stack

Real-Time Ride-Hailing Architecture: Matching, Spatial Indexing & Websockets The moment you open the Uber or Grab app, a cascade of real-time systems activates simultaneously: your phone begins transmitting GPS coordinates, a geospatial index updates your location, a matching engine re-evaluates nearby driver availability, a pricing model recalculates the fare based on supply-demand ratios, and a push notification pipeline prepares to deliver your match confirmation in under 3 seconds. What makes this hard is not any single component — it is the combination of all of them, processing millions of concurrent users, each with sub-second latency requirements, continuously. This post walks through all six layers of the real-time ride-hailing architecture stack, from GPS ingestion to driver notification, using Uber and Grab’s engineering practices as the reference model. ...

June 1, 2026 · 13 min · Lê Tuấn Anh

OSRM Shared Memory on Kubernetes: Zero-Downtime Updates

OSRM Shared Memory on Kubernetes: Live Traffic Updates with Zero-Downtime The Challenge of Operating Large-Scale OSRM on Kubernetes Normally, the osrm-routed process loads the entire binary map file directly into its Heap Memory. For massive files weighing tens of gigabytes, a single Kubernetes Pod can take anywhere from 5 to 10 minutes to finish loading before it becomes healthy and ready to serve traffic. This creates two fatal operational issues: ...

May 15, 2026 · 12 min · Lê Tuấn Anh

Surge Pricing Algorithm & Spatial Indexing Architecture

Surge Pricing Algorithm & Spatial Indexing Architecture Why is it that every time it rains, ride-hailing fares double, or even triple? It’s not a human operator manually adjusting the prices behind a desk. Rather, it’s the result of an incredibly sophisticated Stream Processing engine running in the background executing the surge pricing algorithm. This analysis breaks down the architecture of a real-time dynamic pricing system: indexing geographical rider demand and driver supply using Uber’s H3 hexagonal spatial grids, aggregating supply/demand ratios over Redis sliding windows, and calculating dynamic fare multipliers while damping oscillations and preventing boundary gaming. We also cover why Scaling your Database to handle Surge traffic is a strict prerequisite to prevent your system from crashing during massive traffic spikes. ...

May 12, 2026 · 9 min · Lê Tuấn Anh