Geospatial & Location ServicesMap Matching & RoutingMedium⏱️ ~2 min

Commercial APIs vs Self-Hosted Map Matching Engines

The build versus buy decision for map matching has profound cost and operational implications at scale. Commercial APIs like Google Roads API, HERE Route Matching v8, and Mapbox impose per request costs, rate limits, and batch size constraints. Google Roads caps at 100 locations per request, HERE at 400 points, and Mapbox limits to roughly 300 requests per minute and 1,500 per day on standard plans. For a ride sharing platform processing 333 points per second from 10,000 vehicles, these constraints force sophisticated request batching, geographic sharding, and capacity planning around vendor quotas. Self hosted open source engines like Valhalla and Open Source Routing Machine (OSRM) eliminate per request costs and rate limits entirely. Fast Map Matching reports throughput up to 45,000 points per second on a single server class machine, which covers city scale deployment with modest horizontal sharding. The trade-off is operational complexity: teams must ingest and update map data from OpenStreetMap or commercial providers, maintain spatial indexes, provision capacity, implement monitoring, and staff on call rotations. Map data updates introduce versioning challenges, as roads change and historical trip reconstructions must remain consistent. The cost crossover happens surprisingly early. If each API call costs $0.005 and you process 1 million requests per day, monthly cost hits $150,000. A self hosted cluster of 5 servers at $500 per month each plus 2 full time engineers at $200,000 annual salary totals roughly $35,000 per month, breaking even at around 7 million requests daily. Beyond this threshold, self hosting wins dramatically. However, commercial APIs bundle advanced features like real time traffic integration, truck route restrictions, and multi modal routing that require significant engineering effort to replicate.
💡 Key Takeaways
Google Roads API limits 100 locations per request, HERE Route Matching v8 caps 400 points, Mapbox restricts to 300 requests per minute, forcing batching strategies at scale
Fast Map Matching achieves 45,000 points per second on single server hardware, covering city scale 333 points per second workload with headroom for growth and redundancy
Cost crossover occurs around 7 million requests daily: commercial APIs at $0.005 per call cost $150,000 monthly vs self hosted cluster at $35,000 monthly including engineer salaries
Self hosting requires map data ingestion from OpenStreetMap, spatial index maintenance, capacity planning, and on call support that commercial APIs eliminate
Commercial APIs bundle real time traffic, truck routing, and multi modal features that take significant engineering effort to replicate in self hosted systems
Map data versioning becomes critical for self hosted: road changes must not invalidate historical trip reconstructions used for billing disputes and compliance audits
📌 Examples
Uber likely self hosts map matching given scale of millions of trips daily would cost hundreds of thousands monthly with commercial APIs
A startup with 1,000 trips per day paying $150 per month for Mapbox avoids the $35,000 monthly cost of a self hosted team and infrastructure
OSRM requires 8GB to 16GB RAM for typical metro area road networks and precomputes Contraction Hierarchies taking hours, while Valhalla supports incremental updates
← Back to Map Matching & Routing Overview