-
Notifications
You must be signed in to change notification settings - Fork 214
Add aws-smithy-dns
crate and HickoryDnsResolver
#4274
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
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Needs clean up and integrating with tests
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
Overall looks good, some questions/discussion on naming and how we expose this.
Add hickory-dns feature that enabled rt-tokio an adds hickory as a dep
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
CachingDnsResolver
aws-smithy-dns
crate and HickoryDnsResolver
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.
Looks good. It might be useful to include somewhere (PR description, GitHub discussions, or a changelog) how a customer uses a hickory-based dns resolver end2end with an SDK. Doesn't have to be in this PR, even if we decide to include it.
@@ -0,0 +1,37 @@ | |||
[package] | |||
name = "aws-smithy-dns" | |||
version = "0.1.0" |
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.
Nice, can start as unstable.
Motivation and Context
Add an optional in-memory
HickoryDnsResolver
toaws-smithy-runtime
. This is mostly targeted at supporting customers on AL2023 since it has disabled OS level DNS caching by default. Hyper relies on OS DNS caching if no DNS resolver is provided and this has led to some DNS throttling for users. See links below for examples:We leverage the hickory-resolver crate to provide this functionality.
Description
Add new
HickoryDnsResolver
underaws_smithy_dns
. This wraps ahickory_resolver::Resolver
and provides some minimal configuration options (timeouts, retries, etc.) that seem unlikely to ever go away even though thehickory-dns
ecosystem is still pre-1x.Testing
Added new integration tests at
tests/hickory.rs
. These tests spin up an in-process DNS server on a random port and query it overlocalhost
.Had to fix
CrateSetTest.kt
since the TOML library we use in Kotlin won't parse Cargo.toml files withcfg
statements like[target.'cfg(not(target_family = "wasm"))'.dependencies]
. I had to add one of those statements to preventhickory-resolver
from being compiled for WASM targets since it was introducing a tokio feature that caused compilation to fail and that causedaws-smithy-runtime
to fail in the stability test.Checklist
.changelog
directory, specifying "client," "server," or both in theapplies_to
key.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.