ioredis icon indicating copy to clipboard operation
ioredis copied to clipboard

fix: Allow address family to be resolved from DNS

Open richiejp opened this issue 3 years ago • 5 comments

It may not be possible to know before hand what address a host will resolve to.

Possibly this fixes #1576

richiejp avatar Jun 17 '22 14:06 richiejp

@luin Ping

richiejp avatar Jan 30 '23 14:01 richiejp

Sorry for the delay! Should it be considered as a breaking change?

luin avatar Jan 30 '23 14:01 luin

Yes. If someone has broken DNS then they will find out when this is changed.

richiejp avatar Jan 30 '23 14:01 richiejp

Any updates on this?

maxpain avatar Mar 11 '24 15:03 maxpain

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.

Defman avatar Sep 21 '24 13:09 Defman