The problem/use-case that the feature addresses
When hostnames are used, redis-cli is not capable of setting up a cluster using only hostnames. Originally reported in this comment by @liuchong.
Description of the feature
Support CLUSTER MEET hostname port (do DNS lookup in Redis)
Alternatives you've considered
Let redis-cli do the DNS lookup.
Additional information
Thanks to hiredis, redis-cli can already connect using hostnames, but that's implicitly handled by hiredis.
DNS lookup already implemented in anetResolve() which is used by Sentinel. It would only take a few lines to add it, but tests might require hostnames with DNS records. This is regardless of if we add it to redis-cli or Redis itself.
In #9530 DNS lookup in Redis is listed as "Out of scope". A benefit of doing the DNS lookup in Redis (rather than in redis-cli) is that we can implement TLS SNI/SAN validation for the cluster bus later. That might require more changes though since the hostnames are not currently gossiped.
@madolson Would you prefer DNS lookup to happen in redis-cli or in CLUSTER MEET?
Comment From: zuiderkwast
Related: #3484
Comment From: madolson
@zuiderkwast Strong preference for the DNS lookup to happen in the redis-cli. The hostname should just be a way for clients to connect, since we don't want a DNS dependency inside Redis. In some scenarios, it's possible the DNS isn't even resolvable from the redis nodes.
Comment From: yossigo
@madolson In other scenarios, it's also possible that clients will resolve hostnames to IPs that are different than the ones Redis will resolve to. I think it's OK to keep it on the client side for now, but there's an unresolved issue here (no pun intended).
Comment From: madolson
@yossigo I don't think that is a concern directly. I think you should be calling this orchestration operation while in the same network as the server. Using hostnames here is implicitly risky, since we will resolve to an IP address and then never pay attention to the hostname again.
Comment From: liuchong
🎉