-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support custom DNS resolution #827
Comments
@LucioFranco can you provide more detail on this? Which sinks would need this? It's not clear on this issue what work actually needs to be done. |
@binarylogic I updated the description should be more clear now. |
ImplementationCoreAdd custom name resolver which
Resolver will query It would be good to have all name resolutions done by this resolver to provide simpler UX. This would require modifying sinks: ExtensionsThere are ways to make sink/source discovery even more user friendly in environments like Kubernetes for which this is a good base on which they could be individually added. |
@LucioFranco @binarylogic could you review this. |
@ktff this looks good to me. What would the default be for this? I assume we'd offer DNS resolution by default, without any configuration, correct? |
And to clarify, let's proceed with this. Feel free to begin work unless you have any other outstanding questions or blockers. |
@binarylogic Yes, default DNS resolution will be that of OS, while the provided DNS servers will have priority over OS. |
@lukesteensen do you think we should bundle some of this with more consolidation of our http client. Like removing the default rusoto client and instead use a custom hyper client with our own connector so that we can provide our own DNS resolution? Not sure how worth it might be. |
I don't have a good sense of how much work that would be. I'm also not sure how often people will want custom DNS resolution of AWS services. |
@LucioFranco I don't think there is a need for that, since not all DNS resolutions are done over http client. And changing |
@ktff you're right, we should though implement the DNS resolver as a tower service. I know hyper will be adding support for this in 0.13. @lukesteensen its pretty much this https://github.com/LucioFranco/tower-rusoto/blob/master/src/lib.rs but it would be nice for us to all use one http client throughout all of vector imo. |
@LucioFranco do you mean implementing hyper::client::connect::dns::Resolve trait? |
Yes, but that is moving to become a tower_service in hyper 0.13 hyperium/hyper#1903 |
I think it isn't worth the wait. Since they will be just aliasing it, updating implementation to this new version will be easy. I can also write this so that only |
Oh not suggesting we move, but thinking we may just want to towerize it anyways. |
I agree, then I'll implement this as a Service with Resolve shim on top of it to interface with the http client. |
Update: Once #1118 is merged, we can start work on reworking our internal traits to support passing down the resolver. This will allow our sinks to use it as either a HttpConnector or use it to manually resolve ips. |
Closing this since #1118 resolved the core issue. We will be opening a follow up issue for each sink's implementation. |
As we start to support more cloud native environments users will probably want to use custom DNS resolution to find downstream services. An example of this would be using consul's DNS server to find some downstream sink. Vector should have this support out of the box.
Use case
As a user, I want vector to be able to find downstream services using custom DNS resolution configuration.
Solution
Allow users to supply custom DNS servers or configurations and let Vector pick them up so that they can be used when attempting to connect to a downstream service. In environments like k8 they expose their services via DNS and it is a native protocol for doing service discovery. This will become increasingly useful as Vector gets deployed in more complex cloud environments.
The text was updated successfully, but these errors were encountered: