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

RFC: Option 1: config different LB selections policies by inheritance from a base builder #2750

Conversation

bryce-anderson
Copy link
Contributor

This is the lesser of my two preferred ways to configure different load balancing policies. It uses a base LoadBalancerBuilder from which we can derive new builders from.

I would prefer the pattern in #2749.


import io.servicetalk.client.api.LoadBalancedConnection;

public interface P2CLoadBalancerBuilder<ResolvedAddress, C extends LoadBalancedConnection> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 agreed, this is the least preferred approach. The main reason is that every LoadBalancerBuilder will have to also have a ServiceLoaded provider. With growing number of providers, it makes it harder to control the behavior that way.

@bryce-anderson
Copy link
Contributor Author

Nobody likes this one, so closing.

@bryce-anderson bryce-anderson deleted the bl_anderson/lb_config_option1 branch November 15, 2023 22:59
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.

2 participants