mirrorbits
mirrorbits copied to clipboard
Fails to select a mirror in some cases
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.
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)
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.
I'll try to create a PR with a better explanation. But yes, I agree that basing it on proximity isn't ideal...