OSMCha / osmcha-frontend

Frontend for the osmcha-django REST API
https://osmcha.org
ISC License
121 stars 37 forks source link

Fallback Overpass servers by user config or fallback round robin #589

Open tordans opened 2 years ago

tordans commented 2 years ago

https://github.com/mapbox/osmcha-frontend/issues/587 showed, that the Service is vulnerable to being down due to issues with the overpass server at https://overpass.maptime.in.

How can we fix this?

Idea 1: Settings

How about we add a user setting, that allows knowledgeable users (those that really need OSMCha more urgently than others and are willing to look for it) to change the overpass server URL in https://osmcha.org/user. There is a section with OSMCha settings already ("Review Comments Template"), we could add another one:

Overpass Server URL Advanced setting to change the overpass server that is used to receive the changeset data. Changing this is only recommended if the default server does not work for you (you don't see the changes on the map). [DROPDOWN]

  • Default (Recommended)
  • overpass-api.de

Idea 2: Random fallback

We could also switch the server automatically, but that would cause more load on the other servers. Which we could compensate by randomly picking one of the other servers. https://github.com/pietervdvn/MapComplete/issues/127#issuecomment-702213931 lists 5 servers that seem to be publicly available.

mmd-osm commented 2 years ago

You need attic data for OSMCha, which excludes some of the publicly available servers which don't support that feature.

tordans commented 2 years ago

Looking at the MapComplete code: The way I read it is, they have an ordered list of servers that they walk through whenever a request in one instance fails https://github.com/pietervdvn/MapComplete/commit/09897b47e04e50ab748b88d46df38597d1108cba#diff-834a98b05be1b16950440c43d7a7d14e27a1d9a281a1d81f3542eff101c1b183R178-R206

(And just for me about attic data: https://wiki.openstreetmap.org/wiki/Attic_Data)