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
In AWS EC2 users now have to pay for public IPv4 addresses. Lots of people are migrating to IPv6 hosts, but usually there will still be an IPv4 private network.
Unfortunately when a user tries to access a service like email.us-east-2.api.aws the DNS resolver will return both A and AAAA records. urllib3 will try to connect to the IPv4 address from the A record and your program will just hang until the timeout.
If I could just say "hey disable IPv4 since it isn't routable" for this request that would make life 10,000 times easier.
It's odd that urllib3 would try the IPv4 address first, as it tries them in the order returned by getaddrinfo, and IPv6 normally takes priority in that. If you call socket.getaddrinfo('email.us-east-2.api.aws', 'https'), do IPv4 addresses come first in the results?
Context
In AWS EC2 users now have to pay for public IPv4 addresses. Lots of people are migrating to IPv6 hosts, but usually there will still be an IPv4 private network.
Unfortunately when a user tries to access a service like
email.us-east-2.api.aws
the DNS resolver will return bothA
andAAAA
records.urllib3
will try to connect to the IPv4 address from theA
record and your program will just hang until the timeout.If I could just say "hey disable IPv4 since it isn't routable" for this request that would make life 10,000 times easier.
Alternatives
Really hacky method
Duplicate
#2721
The text was updated successfully, but these errors were encountered: