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

Proxy supports multiple algorithms for load balancing across destinations #58

Closed
3 tasks done
samsp-msft opened this issue Apr 15, 2020 · 7 comments
Closed
3 tasks done
Labels
Priority:0 Used for divisional .NET planning Type: Enhancement New feature or request User Story Used for divisional .NET planning

Comments

@samsp-msft
Copy link
Contributor

samsp-msft commented Apr 15, 2020

Complete the set of common load balancing schemes

  • First healthy endpoint (already implemented)
@samsp-msft samsp-msft created this issue from a note in YARP Planning (1.0 Backlog) Apr 15, 2020
@samsp-msft samsp-msft added the Type: Enhancement New feature or request label Apr 15, 2020
@Tratcher
Copy link
Member

Current implementation:

switch (loadBalancingOptions.Mode)
{
case BackendConfig.BackendLoadBalancingOptions.LoadBalancingMode.First:
// TODO: Remove, this is a silly load balancing mode
if (healthyEndpoints.Count == 0)
{
return null;
}
return healthyEndpoints[0];
case BackendConfig.BackendLoadBalancingOptions.LoadBalancingMode.Random:
throw new NotImplementedException();
case BackendConfig.BackendLoadBalancingOptions.LoadBalancingMode.PowerOfTwoChoices:
throw new NotImplementedException();
default:
throw new ReverseProxyException($"Load balancing mode '{loadBalancingOptions.Mode}' is not supported.");

Note that load balancing is configurable per backend set. Do we need that level of granularity, or could this be specified server wide?

@analogrelay
Copy link
Contributor

Oh it should definitely be per backend. It's very common for different services to have different load profiles and benefit from different kinds of load balancing. It's also something Envoy configures per-cluster which serves as some prior art.

@Tratcher
Copy link
Member

Another one: Least busy
We have the metadata we need for this, it just requires one pass through the list.

@Kahbazi
Copy link
Collaborator

Kahbazi commented Apr 20, 2020

Is it possible to add a feature for blue green deployment to load balancer? or is it out of the scope of load balancer?

@Tratcher
Copy link
Member

Is it possible to add a feature for blue green deployment to load balancer? or is it out of the scope of load balancer?

I think that's a different feature from load balancing that would be handled earlier at the routing phase. Load balancing assumes all nodes are equivalent, plus or minus health/load.

@analogrelay
Copy link
Contributor

I'm going to break this up into smaller issues for individual algorithms. @Tratcher and I were talking about some of them being fairly easy and high-value for preview 1 (while others are more complicated).

@analogrelay
Copy link
Contributor

Created #72 #73 #74 #75

Closing this out now.

@analogrelay analogrelay moved this from 1.0 Backlog to 1.0.0-preview1 in YARP Planning Apr 28, 2020
@analogrelay analogrelay removed this from 1.0.0-preview1 in YARP Planning Apr 30, 2020
@samsp-msft samsp-msft added the User Story Used for divisional .NET planning label Oct 21, 2020
@samsp-msft samsp-msft changed the title Load balancing algorithms Proxy supports multiple algorithms for load balancing across destinations Oct 22, 2020
@samsp-msft samsp-msft added the Priority:0 Used for divisional .NET planning label Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:0 Used for divisional .NET planning Type: Enhancement New feature or request User Story Used for divisional .NET planning
Projects
None yet
Development

No branches or pull requests

4 participants