Strategy to update OSM maps while avoiding the server downtime

I’m looking to avoid the downtime of a GraphHopper server when updating OSM maps (by updating I mean different regions’ maps have to be used). If my understanding is correct, maps can only be built during the compilation time. Plus, if multiple regions have to be stitched together, the downtime could be significant.

When hosting a GraphHopper server in an AWS EC2 instance, what is the strategy to avoid the downtime when the maps have to be updated periodically?

You can run the map imports on a separate machine and copy over the resulting files.

When you say resulting files, do you mean everything within the graphs directory?

Yes. The server will start rather quickly if the files are already present.

If you really want zero downtime for production use, you can have one server to build the graph and two servers to run graphhopper behind a load balancer.
When the graph is built, you can copy the graph on the two servers running graphhopper.
Then restart the first server behind the load balancer, wait for 3 minutes and restart the second server

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.