• Yossi Gottlieb's avatar
    Add hostname support in Sentinel. (#8282) · bb7cd974
    Yossi Gottlieb authored
    This is both a bugfix and an enhancement.
    
    Internally, Sentinel relies entirely on IP addresses to identify
    instances. When configured with a new master, it also requires users to
    specify and IP and not hostname.
    
    However, replicas may use the replica-announce-ip configuration to
    announce a hostname. When that happens, Sentinel fails to match the
    announced hostname with the expected IP and considers that a different
    instance, triggering reconfiguration, etc.
    
    Another use case is where TLS is used and clients are expected to match
    the hostname to connect to with the certificate's SAN attribute. To
    properly implement this configuration, it is necessary for Sentinel to
    redirect clients to a hostname rather than an IP address.
    
    The new 'resolve-hostnames' configuration parameter determines if
    Sentinel is willing to accept hostnames. It is set by default to no,
    which maintains backwards compatibility and avoids unexpected DNS
    resolution delays on sys...
    bb7cd974
sentinel.conf 13.4 KB