Nominatim: The Reference Architecture for Sovereign Geocoding (OpenStreetMap)
TL;DR Every online shop, logistics app, and fleet management system requires geocoding: the …
TL;DR
For logistics companies, delivery services, and fleet managers, routing is the heart of the business. However, using the Google Maps Directions API for every route calculation or distance matrix burns capital significantly. API costs scale linearly with success, and sending live locations to US servers poses GDPR risks. OSRM (Open Source Routing Machine) ends this dependency. It is a C++-based high-performance routing engine that uses OpenStreetMap data. Operated in your own cluster, OSRM calculates thousands of routes per second at a fixed infrastructure price – absolutely sovereign and lightning fast.
Why is OSRM so much faster than traditional database-based pathfinding algorithms (like pgRouting)? The secret lies in preprocessing and architecture.
OSRM uses an algorithm called Contraction Hierarchies (CH) or alternatively Multi-Level Dijkstra (MLD).
Calculating a route from A to B is standard. The real challenge (and the biggest cost factor with Google) is complex logistics problems.
The definition of the “shortest route” depends on the vehicle. A one-way street is taboo for cars, irrelevant for pedestrians.
OSRM uses Lua profiles to define routing behavior.
Here it is decided whether your growth is penalized by API costs or whether your infrastructure scales with you.
Scenario A: Google Maps Directions / Mapbox Routing (The API Tax)
SaaS routing is fantastic for occasional requests but fatal for core logistics.
Scenario B: OSRM with Managed Kubernetes by ayedo
In the ayedo App Catalog, OSRM is provided as a high-performance in-cluster service.
| Aspect | Google Directions API | ayedo (Managed OSRM) |
|---|---|---|
| Costs | Pay-per-Request (Very expensive) | Flatrate (Infrastructure) |
| Performance | Good (but internet latency) | Extremely fast (Local RAM) |
| Distance Matrix | Costs per element/cell | Free (Limited only by CPU) |
| Routing Profile | Predefined | Customizable (via Lua scripts) |
| Data Privacy | Location data to Google | 100% Sovereign (In-Cluster) |
| Strategic Risk | High lock-in & costs | Full Sovereignty |
How much RAM does OSRM need?
This is the crucial hardware factor. Since OSRM holds the graph in RAM, the memory requirement depends on the map section. Routing for all of Germany requires about 10–15 GB of RAM. For Europe, it’s quickly 50 GB. For the entire planet, you need servers with well over 128 GB of RAM. In the ayedo stack, we select the appropriate OSM extract exactly for your region to optimize costs.
Does OSRM consider current traffic (Live Traffic)?
This is the honest trade-off. OSRM calculates the historically fastest route based on static road data (speed limits). Out-of-the-box, it doesn’t have “real-time traffic data” like Google Maps. However, it is possible to inject traffic data (e.g., CSV files with reduced speeds) into the graph regularly via the MLD architecture. For 90% of B2B delivery planning, static routing (which can be supplemented with buffer times) is completely sufficient.
Can I combine OSRM with Nominatim?
Yes, this is the “dream team” of open-source geodata. You use Nominatim (geocoding) to translate the customer’s address into latitude/longitude. These coordinates are then fed into OSRM to calculate travel time and route. Both run sovereignly in your ayedo cluster.
Are there alternatives to OSRM?
Yes, in the open-source area, there are also Valhalla and GraphHopper. OSRM is traditionally the king in terms of pure speed (especially for distance matrices), while Valhalla is sometimes more dynamic in route planning over very large, dynamic distances. However, for highly scalable C2C and B2B logistics APIs, OSRM is the industry standard.
Geodata and routing are the backbone for many modern business models. Those who make themselves completely dependent on the API prices of large cloud corporations limit their own potential for optimization. OSRM delivers enterprise-grade routing speed based on OpenStreetMap. It gives developers the freedom to calculate millions of waypoint combinations without having to think about the budget with every HTTP call. With the ayedo Managed Stack, you get this high-performance logistics engine stable and maintenance-free directly into your own data center.
TL;DR Every online shop, logistics app, and fleet management system requires geocoding: the …
Data is the gold of modern logistics. Knowing when and where each package is, who calculates the …