-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
querier: do A lookups after SRV lookups for store discovery #865
querier: do A lookups after SRV lookups for store discovery #865
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.
I think I like this, it is the common way of dealing with SRV lookup, even though grpc does it as well. The problem is that there are use cases when you don't want to do A lookup after SRV, because you want to use grpc client loadbalancing etc.. Wonder if we can make this optional per target? E.g as dnssrv
and dnsnoasrv
(that's bad naming)
PTAL @ivan-valkov
I'm definitely not an expert, but my understanding is that normally the response includes a I would be happy to extend this PR to support both cases. I don't think we should do anything magic, so as @bwplotka suggests it should probably be explicit from the flag name whether or not we will do the A lookup. I'm not sure what would be better naming than Does that sounds reasonable @bwplotka @ivan-valkov? I would increase the test coverage so that all cases are covered as well of course. |
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.
Yeah, I agree with having both options supported. The names dnssrv
and dnssrvnoa
seems good enough to me given the flag explains that one does a subsequent IP lookup.
That would be awesome! |
d2807fa
to
a72cca1
Compare
Updated to make the old behaviour available by using |
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.
LEGIT! LGTM, thanks. (:
…o#865) * do A lookups after SRV lookups for store discovery * add missing trailing period * re-add old behaviour under dnssrvnoa+
Changes
This adds an A lookup after the SRV lookups in order to resolve #752.
Verification
I made ran the query with
--store
set to a random SRV record (i.e., not something running a store node) then immediately killed the process. During close down, we see what address the querier was attempting to use for the store node.On master:
On this branch
The second one is what we want, as it is the correct
<ip>:>port>
list that we can also pass in directly