GraphHopper Distance Matrix: Self-Host an Open-Source Routing Engine for Production

What Is the GraphHopper Distance Matrix? Answer-first: GraphHopper distance matrix is the /matrix API of the open-source GraphHopper routing engine. It accepts N points and returns an N×N matrix of travel durations (seconds) and distances (meters) based on real road networks from OpenStreetMap — completely free when self-hosted. For 100 delivery stops, it computes 10,000 pairs in under 50ms on a standard VPS. This guide covers everything you need to run GraphHopper distance matrix in production: Docker setup, the /matrix API, Custom Models for truck/motorcycle routing, H3-based Redis caching, and an honest comparison with OSRM, Valhalla, and Google Maps. ...

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

Self-Hosting GraphHopper on Kubernetes with OSM Data

Answer-first: Step-by-step guide to deploying GraphHopper on Kubernetes with OpenStreetMap data: Docker image, PVC for OSM PBF files, RAM tuning, and health probes. GraphHopper is arguably the most capable open-source routing engine available — it supports Contraction Hierarchies (CH) for sub-millisecond route queries, custom vehicle profiles, turn restrictions, and the full OpenStreetMap road network. The problem most teams encounter is not the algorithm; it is the operational challenge of running it in Kubernetes: loading a large OSM PBF file, sizing JVM memory correctly, handling the long CH pre-processing startup time, and updating map data without downtime. ...

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