Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. OpenStreetMap
  3. osrm-backend

osrm-backend

BSD-2-ClauseC++v26.6.5Self-Hosted

A high-performance routing engine written in C++ that provides route, trip, and navigation services using OpenStreetMap data.

Visit WebsiteGitHubGitHub
7.8k stars3.9k forks0 contributors

What is osrm-backend?

OSRM is an open-source routing engine that calculates optimal routes, travel times, and navigation instructions using OpenStreetMap data. It solves problems like fastest path finding, GPS trace matching, and traveling salesman optimization through high-performance algorithms.

Target Audience

Developers and organizations needing self-hosted routing for navigation apps, logistics platforms, or geographic analysis tools without relying on commercial APIs.

Value Proposition

It offers complete control over routing data and infrastructure, supports advanced algorithms like Contraction Hierarchies and Multi-Level Dijkstra, and provides multiple interfaces (HTTP, C++ library, Node.js) for flexibility.

Overview

Open Source Routing Machine - C++ backend

Use Cases

Best For

  • Building self-hosted navigation applications
  • Calculating distance matrices for logistics optimization
  • Snapping noisy GPS traces to road networks
  • Solving traveling salesman problems for delivery routes
  • Generating custom Mapbox Vector Tiles with routing metadata
  • Creating routing services with OpenStreetMap data

Not Ideal For

  • Applications requiring real-time traffic updates and dynamic routing based on live conditions
  • Teams without dedicated infrastructure or DevOps skills for self-hosting and data preprocessing
  • Projects needing a fully integrated navigation solution with pre-built UI components and voice guidance out-of-the-box

Pros & Cons

Pros

Blazing Fast Performance

Uses Contraction Hierarchies and Multi-Level Dijkstra algorithms to compute routes and matrices in milliseconds, optimized for large-scale OpenStreetMap datasets as highlighted in its architecture.

Complete Data Control

Self-hosted setup allows routing on custom OSM extracts without third-party API dependencies, ensuring privacy and cost savings, core to its open-source philosophy.

Multiple Integration Options

Offers HTTP API, C++ library, and Node.js bindings, providing flexibility for web services, embedded systems, and JavaScript applications, as detailed in the quick start.

Advanced Routing Features

Supports complex operations like GPS trace matching, traveling salesman problem solving, and Mapbox Vector Tiles generation, going beyond basic point-to-point routing.

Cons

Cumbersome Data Pipeline

Preprocessing OSM data involves multiple steps (extract, partition, customize) that can take hours for large regions and requires careful file management, as noted in the Docker setup warnings.

Static Data Limitations

Routing relies on preprocessed OpenStreetMap snapshots; integrating real-time traffic or frequent map updates requires manual re-processing, leading to downtime and complexity.

Steep Learning Curve

Customizing routing profiles demands Lua scripting knowledge, and advanced use cases like building from source require C++ and DevOps expertise, beyond simple API consumption.

Open Source Alternative To

osrm-backend is an open-source alternative to the following products:

Mapbox Directions API
Mapbox Directions API

Mapbox Directions API is a web service that provides routing and navigation capabilities, calculating optimal routes between locations for driving, walking, or cycling.

Google Maps API
Google Maps API

A collection of APIs that allow developers to embed Google Maps features into websites and mobile applications.

HERE Routing API
HERE Routing API

A routing API service that provides turn-by-turn navigation, route calculation, and traffic-aware routing for applications.

Frequently Asked Questions

Quick Stats

Stars7,783
Forks3,938
Contributors0
Open Issues353
Last commit1 day ago
CreatedSince 2011

Tags

#map-matching#nodejs-bindings#geospatial#c-plus-plus#http-api#osm#docker#openstreetmap#isochrones#cpp#routing-engine#navigation#routing

Built With

N
Node.js
C
CMake
D
Docker
L
Lua
B
Boost
C
C++

Links & Resources

Website

Included in

Robotic Tooling3.8kOpenStreetMap911
Auto-fetched 22 hours ago

Related Projects

Mapbox GL JSMapbox GL JS

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL

Stars12,299
Forks2,354
Last commit3 days ago
gdalgdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.

Stars5,941
Forks2,900
Last commit1 day ago
osmnxosmnx

Download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.

Stars5,692
Forks868
Last commit26 days ago
geopandasgeopandas

Python tools for geographic data

Stars5,148
Forks1,026
Last commit23 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub