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

A5: Proposal for encoding grpclb data in DNS. #10

Merged
merged 8 commits into from
May 19, 2017

Conversation

markdroth
Copy link
Member

@markdroth markdroth commented Jan 31, 2017

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

Just noticed I hadn't submitted these comments. I don't think I read all the way through.

A5.md Outdated

- service name: `grpclb`
- protocol: `tcp`
- priority: this will be `0` for all grpclb SRV records
Copy link
Member

Choose a reason for hiding this comment

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

What if it's not? Should it ignore any records that contain non-zero? Or should it act as if they were zero?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a note about this.

A5.md Outdated
```

With this data, a gRPC client will resolve the name `server.example.com`
to the following addresses:
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... We aren't actually adhering to the priority/weight, even when 0, since we pass the IPs from all the LBs as single a blob of IPs. The moment there is more than one SRV record, it will behave incorrectly (per SRV). Probably should call that out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unless I'm misunderstanding something from the SRV RFC, I think that records with the same priority and weight are all equally likely to be chosen, which is exactly the behavior that we're supporting here. So I don't think there's any surprise here.

That having been said, I have added a paragraph explaining that we do not support any priority or weighting.

@ctiller ctiller changed the title Proposal for encoding grpclb data in DNS. A5: Proposal for encoding grpclb data in DNS. Mar 31, 2017
@a11r
Copy link
Member

a11r commented Apr 14, 2017

The proposal content LGTM. ARe you leanning to fill out the Java and Go implementation sections soon ? It would be nice to get a sanity check that there is some path to an implementation before we merge this.

@markdroth
Copy link
Member Author

@carl-mastrangelo, can you please provide text for the java implementation section? I know that we discussed several options for how this could be implemented, so it might be useful to outline all of the options and record why we chose the one that we're going to pursue.

@dfawley and/or @menghanl, can you please provide text for the go implementation section? I suspect that this will rely on the work that the two of you are doing to restructure the grpc-go resolver and load balancer APIs (and this section can note that there will be a forthcoming gRFC about that).

Thanks!


### Java

TODO(notcarl): Provide content for this section.
Copy link
Contributor

Choose a reason for hiding this comment

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

Java will depend on JNDI, Netty DNS, dnsjava, or a another DNS library to do SRV record resolution. The existing name resolver, DnsNameResolver will be modified to resolve the additional records, and include them in the Attributes presented to the load balancer.

@markdroth
Copy link
Member Author

Thanks for the info, Carl. I've added that to the doc.

@dfawley, @menghanl, and/or @lyuxuan, can any of you provide info for the Go implementation? Thanks!

will be modified to resolve the additional records and include them in
the Attributes presented to the load balancer.

### Go
Copy link
Contributor

Choose a reason for hiding this comment

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

Go will use the LookupSRV function in package net to do SRV record resolution. We are going to implement a DNS name resolver and will include SRV record resolution.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the info. I've updated the doc.

@a11r, I believe this is ready to be merged now.

@a11r a11r merged commit 3b53fad into grpc:master May 19, 2017
@markdroth markdroth deleted the grpclb_in_dns branch May 19, 2017 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants