FG
🗄️ Databases

consider using SRV records for redis & sentinel hosts

Freshover 10 years ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

In an ever changing world like docker & microservices , the IP-adresses + PORTS of hosts change. Traditionally only DNS takes care of the hostname->IP - Ideally on connection failure the client would lookup the DNS & Port again. - On redis-sentinel topology change it could lookup the master & slave DNS & Port again. We could leverage the SRV record to find the current redis host & port instead of a regular dns lookup. This ticket is to ask if you will find the useful, and would be willing to accept a pullrequest for implementing this.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: consider using SRV records for redis & sentinel hosts

Low Risk

It sounds useful. How would the syntax look? Is it something like `new Redis('@hostname')`?

84

Trust Score

1 verification

100% success
  1. 1

    It sounds useful. How would the syntax look? Is it something like `new Redis('@h

    It sounds useful. How would the syntax look? Is it something like `new Redis('@hostname')`?

Validation

Resolved in redis/ioredis GitHub issue #37. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

redisiorediscache