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

core: Alternate ipV4 and ipV6 addresses for Happy Eyeballs in PickFirstLeafLoadBalancer #11624

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

larry-safran
Copy link
Contributor

@larry-safran larry-safran commented Oct 18, 2024

The gRFC A61 states that addresses should be alternated in the Happy Eyeballs case rather than purely going in the specified order.

}

private static final class InterleavedEntry {
private final int addressGroup;
Copy link
Member

Choose a reason for hiding this comment

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

Just store Attributes directly.

}

private static final class IndexHappyEyeballs implements Index {
private List<EquivalentAddressGroup> addressGroups;
Copy link
Member

Choose a reason for hiding this comment

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

We don't need the original EAGs any more.

interface Index {
static Index create(List<EquivalentAddressGroup> groups) {
if (PickFirstLoadBalancerProvider.isEnabledHappyEyeballs()) {
return new IndexHappyEyeballs(groups);
Copy link
Member

Choose a reason for hiding this comment

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

I don't see why we need two implementations. We can flatten the EAGs all the time, and for Happy Eyeballs do the extra interleaving. Only the interleaving needs to be different. I don't want to duplicate this wide API surface just for interleaving.

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