-
Notifications
You must be signed in to change notification settings - Fork 18
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
SRV lookup done on every http request #183
Comments
Hi @abh, Thanks for letting us know! The SRV lookup logic was added to replicate what we have in the existing Do you have any suggested solutions in mind? If caching the host is required, do you know if it can be done at the |
(rather than going through the options for high availability, the SRV lookup just replaced the hostname that it connects to. Worse the SRV lookup is done on every request, ignoring the connection cache?) hashicorp/vault#5540 hashicorp/vault-client-go#183
My expectation as a user is that it'd follow the same logic the regular HTTP requests do for DNS lookups (so I guess a dialer function for the http.Transport that replaces the address and sets up the regular dialer with the new address? I'm sure it's more complicated than that sadly). |
It's a bit surprising to me to hear that any SRV lookup occurs at all - as use of SRV with HTTP protocols was never standardised. There were a couple of Internet Drafts on the topic, but they didn't get enough momentum to ever graduate to a finished RFC. With that as evidence, I'd claim that most users would be surprised to find an Since this is a relatively new library, I propose the way forward could be to just delete the SRV logic from I would be very surprised to hear of any real Vault instances that needed SRV records to resolve them, as that would indicate they were incompatible with general purpose HTTP clients, and could only be reached using clients specifically customised to make use of SRV. |
Thanks for this info! I did not know this and it's definitely a good argument in favour of removing the SRV support altogether from the new library. For context, it looks like hashicorp/vault#3035 is the original PR that introduced SRV lookups in |
It appears @jefferai was just merging a contributed PR from @nrhall-deshaw, who appears to not have used GitHub in any way since January 2018... The addition of SRV lookups caused pain for others - hashicorp/vault#5540 - leading to them being broken entirely by hashicorp/vault#8016 - and then put back as optional but off by default in hashicorp/vault#8520. Since @spangenberg was interested in fixing them in Or perhaps @abh has a use-case in mind? Unless someone comes forward with information about people actually using SRV records with Vault, I think we should just go ahead and drop the feature from the new client libraries. |
Expected Behavior
SRV lookup done when a new connection to the HTTPS server is necessary.
Current Behavior
SRV lookup is done on every HTTP request to Vault.
The text was updated successfully, but these errors were encountered: