How we replaced Elasticsearch and MongoDB with Rust and RocksDB

submited by
Style Pass
2025-08-08 13:00:02

At Radar, performance is a feature. Our platform processes over 1 billion API calls per day from hundreds of millions of devices worldwide. We provide geolocation infrastructure and solutions, including APIs for:

To support this growth, we developed HorizonDB, a geospatial database written in Rust that consolidates multiple location services into a single, highly performant binary. With HorizonDB, we are able to power all of the above use cases with excellent operational footprint:

Operating and scaling this stack was costly: Elasticsearch frequently fanned queries to all shards and required service-orchestrated batch updates, while MongoDB lacked true batch ingestion, required overprovisioning, and had no reliable bulk rollback for bad data.

An in-process Log-Structured Merge (LSM) tree, serves as our primary record store. It's incredibly fast, typically achieving microsecond response times (even with a much larger dataset, faster than other high performance solutions).   S2 ‍http://s2geometry.io/

S2 is Google's spatial indexing library that projects a quadtree onto a sphere, turning O(n) point-in-polygon lookups into cachable constant time lookups. While writing HorizonDB we wrote Rust bindings for Google's C++ library that we will open source soon.

Leave a Comment
Related Posts