Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems detecting nearest servers #15

Closed
SuperKali opened this issue Oct 16, 2024 · 5 comments
Closed

Problems detecting nearest servers #15

SuperKali opened this issue Oct 16, 2024 · 5 comments

Comments

@SuperKali
Copy link
Member

I've noticed that quite often apt.armbian.com, dl.armbian.com, and occasionally other mirrors do not recognize that I'm geographically close to armbian.atomonetworks.com. Instead, they randomly select servers that are farther away. The issue appears to be entirely random.

For example, when downloading an image from the website, it took me three attempts before the download actually used the closest server.

Here's a test I performed: link.

Do you think this is something we can address?

@tystuyfzand
Copy link
Contributor

tystuyfzand commented Nov 10, 2024

It depends on how many servers are actually nearby, the redirector chooses the top 3 servers and then chooses from those for every subsequent request.

Perhaps there's some tuning we can do that adds a reasonable maximum distance from the closest to next closest mirrors to avoid something like this? Or even add CDN-hosted variants to pad local ones in these cases?

Edit: And also an endpoint to list which servers it chose, as well as all server distances to debug issues like this?

@SuperKali
Copy link
Member Author

@tystuyfzand the server is very close, I'm 16 km from the server but I rarely reach it anyway because it always takes a far away server

@SuperKali
Copy link
Member Author

I also analyzed the requests coming from armbian.atomonetworks.com I noticed that there are requests from all over the globe, and as if it chose randomly, the logic is slightly wrong, at most if the closest server is down, it should choose the closest and most available one, I don't know if there is a way to do it also through a check of the latencies between the client and the server or review the selection logic

@tystuyfzand
Copy link
Contributor

Not really a reasonable way to check latencies which is why geo-routing isn't the greatest but it works. I'm saying that it's choosing the top 3 servers, no matter if they're far or close, so it may be taking servers from 2000km away just because of it being the "next closest" in the list.

@SuperKali
Copy link
Member Author

There’s no way to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants