components-contrib icon indicating copy to clipboard operation
components-contrib copied to clipboard

[Proposal] common DNS interface

Open daixiang0 opened this issue 2 years ago • 9 comments

Describe the proposal

As well known, CSPs usually have their own DNS components, if a CSP wants to introduce Dapr, they would like to implement here. One DNS for one CSP introduced brings more maintenance cost.

Why not provide a common DNS interface for this case, just need to config DNS address then any CSP can use own DNS server?

/cc @yaron2 @artursouza

daixiang0 avatar Dec 03 '21 02:12 daixiang0

Are you talking in terms of DNS for dapr while specifying in CSP headers?

tanvigour avatar Dec 08 '21 07:12 tanvigour

I am not sure what do you mean about CSP headers, my point is that create an easier way to use DNS from CSP rather than implement it in components-contrib.

daixiang0 avatar Dec 09 '21 01:12 daixiang0

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Jan 08 '22 01:01 dapr-bot

I am concerned about pushing Dapr down to layer 4. Can someone provide an example of a scenario where this would benefit cloud native developers? This can help ground the discussion to concrete points.

artursouza avatar Jan 12 '22 21:01 artursouza

@artursouza maybe the title mislead you :(

Many CSPs/software provide their own name resolution, like

  • https://github.com/polarismesh/polaris
  • https://github.com/hashicorp/consul

Now we have some DNS implemented, but like other components, implement needs much time. If we can directly use third-party DNS with abstract calls, developers will benefit from it. What I propose maybe not be an API, more like pluggable DNS components.

daixiang0 avatar Jan 18 '22 02:01 daixiang0

@daixiang0 - The name resolutions components provide this abstaction over DNS. How is this different from implementing a Name Resolution component as there exists for Consul today? https://github.com/dapr/components-contrib/tree/master/nameresolution/consul

msfussell avatar Mar 03 '22 06:03 msfussell

My thought is that no need to implement it into Dapr, just use this to call remote DNS by config.

daixiang0 avatar Mar 03 '22 06:03 daixiang0

Would it be feasible to tell Dapr to use a Key/Value file similar to the hosts file in Windows so it can locate each Service?

Dapr-App-Location file

App1 app1.mydomain.com
App2 app2.mydomain.com
App3 app3.mydomain.com

In our case we are hosting everything in AWS ECS and we are unable to use Service Invocation building block due to this limitation (mDNS does not work and we don't want to configure yet another service like Consul).

AWS ECS Service Discovery already provides the DNS resolution capability that we need but we can't use it.

fbridger avatar Mar 03 '22 11:03 fbridger

@fbridger. Implementing a Name Resolution component for AWS ECS service discovery really is the way to go IMO. https://github.com/dapr/components-contrib/issues/1197 Would you want to take a look implementing this, since the Name Resolution API is very simple.

You could have a static file Name Resolution component like a host file but given the required dynamic name of name resolution if is not that useful IMO.

msfussell avatar Mar 04 '22 21:03 msfussell

@daixiang0 was this feature implemented? Could you point me to the PR?

fbridger avatar Sep 07 '22 11:09 fbridger

If you mean AWS ECS service discovery, please track #1197.

For now, DNS still does not have a common interface.

daixiang0 avatar Sep 08 '22 01:09 daixiang0