-
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
discovery: use thanos resolver for endpoint groups #7565
discovery: use thanos resolver for endpoint groups #7565
Conversation
a9adf95
to
01fe986
Compare
@@ -891,14 +906,12 @@ func prepareEndpointSet( | |||
} | |||
|
|||
for _, eg := range endpointGroupAddrs { | |||
addr := fmt.Sprintf("dns:///%s", eg) |
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.
Note: this is a breaking change; its so that people can chose to keep previous behavior by adding "dns:///" prefix or opt into thanos resolver by adding "thanos:///" prefix; alternatively we could snoop if thanos:/// is added and if not add dns:/// or just add "thanos:///" by default, in theory it should be not noticeable mostly. I like it better to state the resolver explicitely here.
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's the main difference between the Thanos DNS resolver and the default DNS resolver we are using?
Trying to understand if it is a big difference. If it is, then I think the detection is needed and if no prefix is added we can still default to dns://
. If there is no big difference I think I am fine either way
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.
The thanos one understands our "dnssrv+" stuff while the dns one does not. Otherwise it should be roughly the same.
01fe986
to
557a848
Compare
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.
Will this allow us to resolve addresses periodically? The dns resolver will never do re-resolution, unless all targets become unhealthy.
Is this true? I remember it resolves every 30 min. But still almost unusable. |
Yeah the resolver per connection runs in a loop and updates the addresses for it every configured SD interval like normal endpoint too |
This is my understanding based on grpc/grpc#12295, but yes, even 30 minutes is very long. |
557a848
to
dae758a
Compare
Signed-off-by: Michael Hoffmann <[email protected]>
dae758a
to
ef38b8a
Compare
Test is flaky on main right now, merging. |
Signed-off-by: Michael Hoffmann <[email protected]>
Endpoint Groups behave differently from regular endpoints right now. Regular endpoints are resolved periodically by our own resolvers but endpoint groups use the grpc "dns:///" resolver. This PR adds a "thanos:///" resolver that remedies this.
Changes
Verification