You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the purpose of always doing the DNS resolution on both IPv4 and IPv6 regardless of preference? I'd think that if you prefer IPv4 and that DNS resolves to an IPv4 IP, there isn't really a point of resolving IPv6?
The reason I am bringing this up is because DNS resolution can sometimes (due to various problems) take a very long time. E.g. on our corporate network resolving localhost in IPv6 sometimes takes upwards of 5 seconds, causing intermittent test failures on development machines as it happens to be a gen_server:call/2 timeout. Similarly in Kubernetes these DNS resolution can cause issues.
If you agree that there is no need to do this resolution, I'd be more than happy to make a PR.
The text was updated successfully, but these errors were encountered:
haljin
changed the title
amqp_client resolved DNS twice
amqp_client resolves DNS twice
Jan 26, 2021
inet_address_preference/0 was likely introduced after the client already resolved thing in a specific way. You are welcome to make gethostaddr/1 respect the preference setting and submit a PR.
Hi,
I have noticed that in
amqp_network_connection.erl
there are the following functions:What is the purpose of always doing the DNS resolution on both IPv4 and IPv6 regardless of preference? I'd think that if you prefer IPv4 and that DNS resolves to an IPv4 IP, there isn't really a point of resolving IPv6?
The reason I am bringing this up is because DNS resolution can sometimes (due to various problems) take a very long time. E.g. on our corporate network resolving
localhost
in IPv6 sometimes takes upwards of 5 seconds, causing intermittent test failures on development machines as it happens to be agen_server:call/2
timeout. Similarly in Kubernetes these DNS resolution can cause issues.If you agree that there is no need to do this resolution, I'd be more than happy to make a PR.
The text was updated successfully, but these errors were encountered: