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

Extract inner types from RoundRobinLoadBalancer #2724

Merged

Conversation

bryce-anderson
Copy link
Contributor

Motivation:

The RoundRobinLoadBalancer contains a bunch of code that is doing a good deal more than load balancing, namely it's doing pooling, circuit breaking, and other things. This both makes the implementation hard to read and reason about and makes the inner pieces difficult to reuse for future load balancer implementation.

Modifications:

  • Extract the types into their own files.
  • Hide a bit of the internal state to start to define abstraction boundaries. Note that this is pretty minimal so far, just accessors etc, so to keep this PR mechanical in nature.

Motivation:

The RoundRobinLoadBalancer contains a bunch of code that is doing a
good deal more than load balancing, namely it's doing pooling, circuit
breaking, and other things. This both makes the implementation hard to
read and reason about and makes the inner pieces difficult to reuse for
future load balancer implementation.

Modifications:

- Extract the types into their own files.
- Hide a bit of the internal state to start to define abstraction boundaries.
  Note that this is pretty minimal so far, just accessors etc, so to keep
  this PR mechanical in nature.
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Thank you!

@bryce-anderson bryce-anderson merged commit f00a486 into apple:main Oct 17, 2023
15 checks passed
@bryce-anderson bryce-anderson deleted the bl_anderson/RR_extract_types branch October 17, 2023 00:04
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