fix: Allow address family to be resolved from DNS
It may not be possible to know before hand what address a host will resolve to.
Possibly this fixes #1576
@luin Ping
Sorry for the delay! Should it be considered as a breaking change?
Yes. If someone has broken DNS then they will find out when this is changed.
Any updates on this?
I have sort of the inverse problem. In our dualstack setup we have aws vpc dns64, this works great with our nat... however our elasticache is placed in a legacy VPC without ipv6. However this should in its own not be a problem. But since the dns server returns both ipv4 and ipv6 addresses for the elasticache cluster dns... ioredis seems to get stuck in ClusterAllFailedError: Failed to refresh slots cache. I have tried setting ?family=4 however this does not seem to force ioredis to resolve the hostname to only ipv4. Any suggestions for workarounds, place a dns server in front of the default dns server and have it strip out the ipv6 addresses...
Note: ioredis does not seem to have this problem.