geolocation api rate-limit
Introduce a general rate-limiter and the caching of response data for request directed to geocoding providers.
This also introduce a mechanism to ensure the sum of traffic does not exceed provider limits, and so to delay requests to be sure to not ask to geocoding provider more than 1time/second, despite eventually unstable network conditions.
From https://operations.osmfoundation.org/policies/nominatim/
[Requirements] No heavy uses (an absolute maximum of 1 request per second).
[Websites and Apps]
- Note that the usage limits above apply per website/application: the sum of traffic by all your users should not exceed the limits.
- If at all possible, set up a proxy and also enable caching of requests.