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

Fallback to other librex instances #261

Closed
wants to merge 8 commits into from
Closed

Fallback to other librex instances #261

wants to merge 8 commits into from

Conversation

davidovski
Copy link

@davidovski davidovski commented Aug 7, 2023

Supersedes #260

When a google request fails for whatever reason, rather than redirecting to another instance on the user's end, librex will pick another instance at random and use it's api to fetch search results.

Todo:

  • Fetch results from randomly chosen librex instance
  • Create config parameter to disable fallback functionality
  • Don't return results from "broken" instances
  • Ensure that search settings are preserved when making api request
  • Do not allow requests to be made to the current instance (recursive request)

@davidovski davidovski mentioned this pull request Aug 7, 2023
@davidovski davidovski marked this pull request as ready for review August 7, 2023 17:34
@davidovski
Copy link
Author

Generally this seems to work well, though occasionally some instances will return results in the wrong language (perhaps an outdated instance?) The main drawback is the response time, since not only does google need to tell librex it hasn't got anything, but it needs to check other instances which slow down the speed at which results are returned to the user.

However despite these minor issues, results are (nearly) always returned to the user when librex cannot get any results from google itself (tested by blocking via hostsfile).

Hopefuly this resolves #251 and can be merged into main soon.

@davidovski davidovski closed this by deleting the head repository Dec 27, 2023
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

Successfully merging this pull request may close these issues.

1 participant