Executive Summary: Geospatial & Routing Architecture

Pillar Architecture Guide: This article is part of the Multi-region Geo-distributed API Routing Architecture series. Please refer to the original article for a comprehensive overview of the architecture. Prerequisite: This is the executive summary and introductory overview of the Routing & Geospatial Architecture series. No prior reading is required to start here. Executive Summary: Geospatial & Routing Architecture Executive Summary & Quick Answer: High-concurrency routing systems combine Java-based GraphHopper engines for Contraction Hierarchies pathfinding with a Golang API Gateway using Uber H3 hexagonal indexing and Redis semantic caching. This architecture resolves 100x100 distance matrices in under 30ms while reducing compute load by up to 95%. ...

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

Ride-Hailing GPS Location Ingestion Pipeline in Go

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 Executive Summary & Quick Answer: 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. ...

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

Uber H3 Geospatial Indexing: Redis Driver Discovery

Uber H3 Geospatial Indexing: Redis Driver Discovery Executive Summary & Quick Answer: 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. Key Takeaways: Equidistant Neighbor Property: Hexagons eliminate the 41% diagonal distance distortion found in square grids (Google S2 / Geohash). Sub-10ms Proximity Lookups: K-Ring expansion ($K=1$, 7 cells) retrieves active candidate drivers via sharded Redis SET pipelines. Scale Optimization: Sharding active driver keys across Redis/Dragonfly DB nodes prevents single-key write lock bottlenecks under 1.25M write IOPS. What You’ll Learn That AI Won’t Tell You: ...

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

OSRM vs GraphHopper: Routing Engine Architecture Comparison

OSRM vs GraphHopper: Routing Engine Architecture Comparison Answer-First: OSRM offers sub-millisecond route calculation using C++ Contraction Hierarchies optimized for static single-profile applications like ride-hailing. GraphHopper uses Java-based Customizable Contraction Hierarchies and Landmark algorithms to support dynamic multi-profile routing required for complex 3PL logistics. Introduction: When Do You Outgrow Cloud Route APIs? Building early-stage logistics applications with cloud routing APIs provides immediate reliability, accurate ETAs, and zero infrastructure maintenance. However, when daily traffic exceeds 100,000 requests or requires massive distance matrices for vehicle route optimization, proprietary API costs explode while rigid routing profiles prevent injecting custom fleet constraints across modern 2026 logistics platforms. ...

July 17, 2026 · 10 min · Lê Tuấn Anh

Part 8: Zero-Downtime Map Updates & Multi-Region Kubernetes

Answer-First: Zero-downtime Kubernetes deployments for routing services combine Argo Rollouts canary strategies, pre-stop hook draining, and automated P99 latency validation. Pillar Architecture Guide: This article is part of the GitOps at Scale: Kubernetes & ArgoCD for Microservices series. Please refer to the original article for a comprehensive overview of the architecture. Prerequisite: Before reading this final part, review Part 7: Load Testing & Performance Tuning. Part 8: Zero-Downtime Map Updates & Multi-Region Kubernetes Executive Summary & Quick Answer: Deploying stateful routing engines to Kubernetes without downtime requires decoupling map graph compilation into offline jobs, hydrating Pod cache volumes via initContainers, and executing atomic Blue-Green traffic cuts via Argo Rollouts to preserve Redis semantic cache consistency. ...

June 15, 2026 · 9 min · Lê Tuấn Anh

Part 7: Load Testing and Performance Tuning for Production

Answer-First: Production load testing for geospatial microservices requires realistic traffic simulation with k6/Vegeta to identify latency spikes and connection pool bottlenecks. Pillar Architecture Guide: This article is part of the GitOps at Scale: Kubernetes & ArgoCD for Microservices series. Please refer to the original article for a comprehensive overview of the architecture. Prerequisite: Before starting load testing, review Part 6: Location Clustering & Semantic Caching. Part 7: Load Testing and Performance Tuning for Production Executive Summary & Quick Answer: Load testing a high-scale routing architecture requires avoiding Coordinated Omission by using K6 open-arrival-rate models (executor: 'constant-arrival-rate'), tuning the Linux kernel TCP stack (sysctl net.core.somaxconn=65535), and profiling Go GC garbage collections using pprof. ...

June 15, 2026 · 9 min · Lê Tuấn Anh

Uber H3 Spatial Clustering & Redis Semantic Caching

Answer-First: Redis semantic caching for routing queries utilizes geo-hash indexing and embedding similarity vectors to serve frequent route lookups with sub-5ms latency. Pillar Architecture Guide: This article is part of the GitOps at Scale: Kubernetes & ArgoCD for Microservices series. Please refer to the original article for a comprehensive overview of the architecture. Prerequisite: Before reading this part, review Part 5: Route Visualization UI. Part 6: Location Clustering with Uber H3 & Redis Semantic Caching Executive Summary & Quick Answer: Semantic caching transforms continuous floating-point GPS coordinates into discrete Uber H3 hexagonal keys (Resolution 8/9), increasing cache hit rates from 0% to over 80%. Combining H3 spatial keys with Redis MGET pipelines and XFetch early recomputation prevents cache stampedes and lowers matrix latency to <2ms. ...

June 15, 2026 · 10 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. Pillar Architecture Guide: This article is part of the GitOps at Scale: Kubernetes & ArgoCD for Microservices series. Please refer to the original article for a comprehensive overview of the architecture. ...

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

Golang Routing Microservices with Kratos & Dapr Framework

Answer-First: High-throughput geospatial microservices in Go leverage H3 spatial indexes, concurrent goroutines, and Protobuf gRPC APIs for real-time ETA calculation. Pillar Architecture Guide: This article is part of the GitOps at Scale: Kubernetes & ArgoCD for Microservices series. Please refer to the original article for a comprehensive overview of the architecture. Prerequisite: Before reading this part, review Part 3: Spatial Indexing. Part 4: Golang API & Microservices Integration (Kratos & Dapr) Executive Summary & Quick Answer: Integrating a high-concurrency Golang API Gateway with a downstream Java routing engine requires robust defense-in-depth patterns: golang.org/x/sync/singleflight for request deduplication, sony/gobreaker circuit breakers for fail-fast isolation, and flattened 1D arrays for Protobuf distance matrix serialization to prevent Go GC pauses. ...

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 Executive Summary & Quick Answer: 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

Part 2: Environment Setup with Docker, OSM & Golang

Prerequisite: Before starting this part, review Part 1: Core Routing Algorithms Visualized. Part 2: Zero to Hero Environment Setup (Docker, OSM, Golang) Executive Summary & Quick Answer: Setting up a production-grade routing environment requires extracting OpenStreetMap .osm.pbf map data via Osmium tools, provisioning GraphHopper Java containers with explicit JVM heap allocations (-Xmx6g), and connecting a Golang API client with exponential backoff health checks. Key Takeaways: Map Extraction: Bounding-box cropping with osmium extract reduces raw .osm.pbf file size by 90%, speeding up graph compilation. Container Tuning: Allocate sufficient JVM heap (JAVA_OPTS=-Xmx6g) to prevent Out-Of-Memory (OOM) failures during Contraction Hierarchies shortcut generation. Client Resiliency: Golang HTTP clients must use connection pooling (MaxIdleConnsPerHost: 100) to sustain high matrix throughput. What You’ll Learn That AI Won’t Tell You: ...

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

Part 1: Core Routing Algorithms — A* & Dijkstra Visualized

Prerequisite: This part builds on the concepts introduced in the Executive Summary. Part 1: Core Routing Algorithms — A* & Dijkstra Visualized Executive Summary & Quick Answer: A* pathfinding uses Euclidean heuristics to accelerate 1-to-1 point routing, whereas Single-Source Dijkstra is mathematically superior for 1-to-N distance matrix calculations because it builds a single shortest-path search tree to all reachable destinations in one pass. Key Takeaways: Matrix Efficiency: Dijkstra expands radial wavefronts in a single pass, computing 1-to-N driver matrices 10x faster than running N independent A* searches. Turn Restrictions: Edge-based graph representation models turn penalties (e.g. prohibited U-turns) by representing turns as edges between directed road segments. Shortcut Hierarchies: Contraction Hierarchies contract local nodes offline, reducing real-time search space by orders of magnitude. What You’ll Learn That AI Won’t Tell You: ...

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