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

Add selectrandom fallback in routing and only scraping healthy pods #445

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Nov 27, 2024

Pull Request Description

  1. Add selectrandom fallback in different routing algorithms
  2. Only fetch metrics from healthy pod

Related Issues

Resolves:

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

The primary reason is that the cache might not be available when the request arrives. Instead of throwing an error, it’s better to select a random option.
@Jeffwan Jeffwan changed the title Add selectrandom fallback in different routing algorithms Add selectrandom fallback in routing and only scraping healthy pods Nov 27, 2024
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Nov 28, 2024

I will merge this first and feel free to leave comments so I can address it in future PRs. @nwangfw

@Jeffwan Jeffwan merged commit 5fd23a2 into main Nov 28, 2024
10 checks passed
@Jeffwan Jeffwan deleted the jiaxin/gateway-improvements branch November 28, 2024 01:37
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
…445)

* Add selectrandom fallback in different routing algorithms

The primary reason is that the cache might not be available when the request arrives. Instead of throwing an error, it’s better to select a random option.

* Update to use latest rand for testing and fix lint issue

* fix unit test errors
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