mirrorbits icon indicating copy to clipboard operation
mirrorbits copied to clipboard

Fails to select a mirror in some cases

Open lazka opened this issue 4 years ago • 3 comments
trafficstars

Examples:

  • https://mirror.msys2.org/distrib/msys2-i686-latest.exe?mirrorlist&fromip=1.0.7.255
  • https://mirror.msys2.org/distrib/msys2-x86_64-latest.exe?mirrorlist&fromip=23.248.181.0

There is one nearby, but it just switches to random, which seems buggy.

lazka avatar Jun 14 '21 14:06 lazka

I didn't quite get the existing logic so I've tried to clean it up here: https://github.com/msys2/msys2-main-server/blob/6bf6893a8f6db1bac250897e60e9231ee742d86a/mirrorbits/0001-Rework-the-mirror-selection-logic.patch

Maybe someone finds it useful.

(This also means my links above no longer show the issue)

lazka avatar Jun 14 '21 21:06 lazka

Can you explain your changes more. I could not follow them. For example, where the 1000 km come from.

I also have doubts about the assumption that geographic proximity means a good quality of service with high bandwidth and low latency. Most likely more sophisticated calculations are needed. I tried to explain this in Fedora MirrorManager issue 308. Another recent example has been mentioned in pull request 298 of the openSUSE MirrorCache project.

ott avatar Sep 17 '22 21:09 ott

I'll try to create a PR with a better explanation. But yes, I agree that basing it on proximity isn't ideal...

lazka avatar Sep 18 '22 06:09 lazka