How to host ORS backend in the cloud & be able to handle requests from thousands of users?

I understand you are able to host the backend in some way in a Docker container, but after that, how can I make it accessible to the world?

Will a single docker container be sufficient to handle thousands of requests per minute?

Am I correct in thinking that if I want to be able to query the whole map for routing & poi purposes, I’ll need to have a virtual cloud instance with 128GB+ of RAM and have to pay $1000+ per month to do this?

Is there no way to be able to pay per request for ORS data? Or is there anyone hosting this data and charging for it?

Additionally, maybe more simply, what is the most cost efficient way to self-host (given your supporting queries for the entire planet) ?

Hey Kes,

I am running a self hosted docker on an odroid h3 with 32gb ram. This is more than sufficient for entire countries like DE or AT and even continents (except Europe). You should give it a try using this video: Setup a Self-Hosted OpenRouteService Instance with Docker on Windows, Mac or Linux - YouTube - that has worked fine for me
They also published valuable info here about what specs should be like Advanced Docker Setup | openrouteservice documentation

Blockquote We generally recommend at least twice the amount of RAM as the file size, but to tell Java this, you need to update the JAVA_OPTS in the environment section of the docker-compose file. In that line, you will see the -Xms1g and -Xmx2g items. These tell Java that it should start with 1GB RAM assigned to it, and go no higher than 2 GB of usage. If your pbf file is 1.5 GB in size then you would update the -Xmx item to be AT LEAST -Xmx3g. In general, we would recommend adding a bit more to the RAM value if possible to reduce the chances of hitting an out of memory exception towards the end of the graph building."

I’ve allocated 10 gb to the container and do not run into memory exception errors…

1 Like