OSRM vs GraphHopper: Routing Engine Architecture Comparison

OSRM vs GraphHopper: Routing Engine Architecture Comparison 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. Not only are they prohibitively expensive at scale, but these proprietary APIs also lack the flexibility required to inject custom routing rules. For instance, if your logistics fleet consists of 5-ton trucks that cannot enter certain city districts between 6 AM and 8 AM, or if you need to strictly penalize left turns at specific intersections to optimize fuel consumption, standard APIs fall short. They offer generic profiles for ‘driving’ or ‘bicycling’, but they do not allow you to define the exact physics and legal constraints of your unique vehicles. ...

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

GraphHopper Distance Matrix: Self-Host, API & Alternatives

GraphHopper Distance Matrix: Production Self-Hosting & API Guide How to Call the GraphHopper Matrix API (/matrix Endpoint) Running GraphHopper distance matrix in production requires configuring Docker deployment, the /matrix API endpoint, Custom Models for vehicle-specific routing (truck/motorcycle), H3-based Redis caching, and evaluating performance tradeoffs against OSRM, Valhalla, and Google Maps (for an in-depth analysis of routing engine selection, see our OSRM vs GraphHopper Architecture Comparison). The /matrix endpoint evaluates element-by-element matrix calculations between sets of origin and destination coordinates. When issuing requests, callers specify input point arrays along with requested output arrays such as times (travel duration in seconds) and distances (road distance in meters). Depending on graph preparation, GraphHopper can evaluate matrix queries using speed-optimized Contraction Hierarchies (CH) or flexible Landmark-based (LM) routing models. ...

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