querier: do A lookups after SRV lookups for store discovery#865
querier: do A lookups after SRV lookups for store discovery#865bwplotka merged 3 commits intothanos-io:masterfrom
Conversation
bwplotka
left a comment
There was a problem hiding this comment.
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. |
ivan-valkov
left a comment
There was a problem hiding this comment.
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 |
…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
--storeset 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