Rate limiter help

I am working on creating two approximately 150 by 150 matrices of driving distances between locations for a project about optimizing delivery routes. Requesting all these distances at once obviously exceeds the rate limit by quite a bit, but I’m not sure if there’s a way to apply a rate limiter the way there is with some other APIs.

I’d love an example or two of how to do this with the matrix feature.

Yeah! … to get unlimited stuff you need your own build of the some/all of the servers (ORS, POI and Pelias) to get all the neat stuff to rock and roll.

Then you can do what ever you want :slight_smile:

How do I do that?

Also, other services, such as GeoPy allow the user to specify a rate limit so that program execution goes slower and required rates are never exceeded. Is there a way to do that with Open Route Service?

Easies way currently is docker images. Just follow the instructions from Running your own openrouteservice instance | openrouteservice backend documentation and you should be ok.

The POI and Pelias installation follows the same protocol: get the docker composition file, and run docker compose up -d

I don’t know … if you install the three docker images you should have all kinds of nice things doable then.

Okay. Do you have any examples of using this in code? I’m very new to this sort of thing and I can’t find examples that seem specific to the Docker image. If you have something specific to matrixes, that’d be great, but anything would be helpful!

I don’t but @amandus might help you out better :slight_smile:

Okay, thank you!

You woulnd’t do this in openrouteservice but the script you are requesting ors with.
Our QGIS plugin has some implementation for this in python. But depending on what language you are using our API with it differs.
Search for retry requests / sleep / wait in your language.

Of course running your own ors instance where you have no limits is also one solution to the problem.

Best regards