Status: routing is in development and not deployed. There is no router to download, no hosted endpoint, and no routing plan, price or key. This guide describes how the router runs so you can plan a deployment.
The geolith router answers Valhalla-compatible routing requests from one .glx file with a routing part, and nothing else: no database, no graph to load into memory before the first request.
What you need
- A
.glxfile with a routing part, written by the builder: see build a routing .glx file. - Somewhere to keep the file: an R2 bucket for a Cloudflare Worker, or local disk for a server.
- The router. It is a Rust library with no I/O of its own: it asks for the bytes a request needs and the app around it fetches them.
How the router reads the file
At start the router reads the file header, finds the routing part, and keeps the tile index and the zstd dictionary in memory. Each request then fetches only the 64 KiB blocks its search touches:
- Cloudflare Worker: the router compiled to WebAssembly; the file in R2; one range read per block. Decoded blocks are cached per isolate.
- Server: the same library next to a file on local disk; one file read per block. A packaged server binary is planned.
The endpoints it serves
| Path | What it answers |
|---|---|
/route | A route between two or more points |
/sources-to-targets | A time and distance matrix |
/isochrone | The area reachable within a time or a distance |
/trace-route | A GPS trace snapped to roads, as a route |
/trace-attributes | The road attributes along a GPS trace |
Bodies are Valhalla's; costing is auto, pedestrian or bicycle. Paths are kebab-case: a Valhalla client needs a new base URL and the path changes in migrate a Valhalla client.
Live speeds and closures
Live speeds and closures are not in the file. The program that runs the router supplies them beside it, so the .glx file stays immutable and cacheable. They apply to requests with a date_time. See traffic and live data.