-
Notifications
You must be signed in to change notification settings - Fork 239
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
@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! |
A5-grpclb-in-dns.md
Outdated
|
||
### Java | ||
|
||
TODO(notcarl): Provide content for this section. |
There was a problem hiding this comment.
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.
will be modified to resolve the additional records and include them in | ||
the Attributes presented to the load balancer. | ||
|
||
### Go |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Discussion thread: https://groups.google.com/d/topic/grpc-io/6be1QsHyZkk/discussion