azure managed redis node connects with ip, not SNI for TLS

Jon 0 Reputation points
2026-07-31T16:33:59.11+00:00

I have an azure managed redis instance set up in OSS Clustering mode. The redis cluster has a hostname xyz.eastus.redis.azure.net, so I can connect to it via TLS and verify that the certificate on the cluster matches the hostname. But when I do 'CLUSTER SHARDS' I get back nodes with IP addresses

    3) "nodes"
   4) 1)  1) "id"
          2) "1"
          3) "tls-port"
          4) (integer) 8501
          5) "ip"
          6) "10.0.0.5"
          7) "endpoint"
          8) "10.10.0.8"
          9) "hostname"

My client library (python redis 8.0.1) then tries to make a TLS connection to one of these IPs (I think 10.10.0.8) but fails because TLS connections cannot be made to pure IPs. The cluster shard should have had a hostname like xyz-shard.eastus.redis.azure.net or something.

I can get this to work by disabling hostname checking in the configuration of my python code like so, but I should not have to do this. Any idea how to get hostnames for shards in azure managed redis?

redis = RedisCluster(host=..., port=10000, password=..., ssl_check_hostnames=False)
Azure Cache for Redis
Azure Cache for Redis

An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.