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

GraphHopper vs CARTO: Order Fulfillment Routing Engine

Answer-first: A comparison between the GraphHopper Distance Matrix API and CARTO Spatial Analytics. A guide to building an order fulfillment routing engine (VRP). In last-mile delivery and logistics, calculating a route is not just about finding the shortest path from point A to point B. When a system needs to coordinate thousands of drivers and orders simultaneously, computational costs can explode exponentially. This article will compare two popular approaches: utilizing GraphHopper for lightning-fast GraphHopper distance matrix calculation, and leveraging the CARTO Spatial Platform (focused on spatial analysis in Cloud Data Warehouses). We will also explore how to integrate this routing data into Real-time Surge Pricing Calculation to optimize operational costs. For routing within geospatial indexing systems (H3 hexagons, Redis GEO), see Part 2 — Geospatial Indexing: H3, S2 & Redis GEO. ...

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