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

Improve mirror selection process #23

Closed
nroi opened this issue Oct 28, 2020 · 2 comments
Closed

Improve mirror selection process #23

nroi opened this issue Oct 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@nroi
Copy link
Owner

nroi commented Oct 28, 2020

The mirror selection process and the default settings should be improved such that:

  • If the user has a high latency internet connection, the user will not end up without any mirrors (i.e., Flexo will not abort with the message Unable to find remote mirrors that match the selected criteria..
  • Mirrors from different locations are considered so that users will run their latency tests against mirrors from the same continent (See Verbose mode? #22 for more details: The user is located in Australia, but the latency tests run only against European mirrors).
@nroi nroi mentioned this issue Oct 28, 2020
@nroi
Copy link
Owner Author

nroi commented Oct 31, 2020

Plan so far: Implement two different strategies for selecting the mirror: cached and uncached.

  • At the first start of Flexo, nothing is cached, so we use the uncached strategy: the number of mirrors to be tested is not restricted, all mirrors that match the criteria specified by the user (e.g. HTTPS supported, IPv6 supported) are tested.
  • To avoid rerunning too many tests at each start, we store the country codes of the fastest mirror in a cache. For example, a user located in Germany could have the country codes DE, NL, CZ and FR stored in the cache. When Flexo is restarted, we use the cached strategy where only mirrors with the previously stored country codes are considered.
  • After a specified time period (one week? one month?), the country codes are cleared from the cache and all mirrors are tested again.
  • If the best mirror selected by the cached strategy exceeds a specified latency threshold, use the uncached strategy as a fallback (this should be useful in case the user travels from one continent to another and still has the cached results from the previous continent).
  • Optionally allow the user to specify a list of country codes so that only mirrors from those countries are considered. This can be useful to decrease the startup time of Flexo and still get fast mirrors.

nroi added a commit that referenced this issue Dec 5, 2020
@nroi nroi added the bug Something isn't working label Dec 5, 2020
@nroi
Copy link
Owner Author

nroi commented Dec 5, 2020

Fixed via #25
Fix is available starting from version 1.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant