Setting up DNS correctly is essential for Redis to support high-availability, automatic failover, and reliable communication between nodes. This article shows you how to choose and set up your cluster's FQDN, do DNS delegation, and check that your setup lets you resolve database endpoints. It also includes FAQs, CLI troubleshooting tips, and links to provider-specific setup instructions for AWS, Azure, Google Cloud, Windows Server, and BIND.
Choosing and Setting the Cluster FQDN
Pick a subdomain under your DNS domain (e.g., mycluster.example.com) to serve as your cluster's Fully Qualified Domain Name (FQDN).
- The FQDN is a unique, permanent name for your Redis cluster.
- It must follow DNS naming rules (RFC 952 and RFC 1123):
- Use letters, numbers, and hyphens only
- No underscores
- Start and end with a letter or number.
- Redis uses the FQDN for internal resolution and to generate database endpoints.
- You set it once during installation—it can’t be changed later.
Configure During Installation
When installing Redis Software:
Enter the selected FQDN (e.g., mycluster.example.com) in the Cluster Name / FQDN field.
- Redis deploys a built-in DNS server on each node, making each node authoritative for the subdomain.
DNS Delegation Requirements
To delegate your chosen subdomain to the Redis cluster, configure the following records in your DNS provider's zone for the parent domain (e.g., example.com):
-
NS Record—Delegates the subdomain (e.g.,
mycluster.example.com) to the Redis cluster nodes. - A Records (Glue Records) — One for each node, mapping node FQDNs to their IP addresses.
Example Required Records
mycluster.example.com. IN NS node1.mycluster.example.com.
IN NS node2.mycluster.example.com.
IN NS node3.mycluster.example.com.
node1.mycluster.example.com. IN A 10.0.0.1
node2.mycluster.example.com. IN A 10.0.0.2
node3.mycluster.example.com. IN A 10.0.0.3Database Endpoint Format
Once delegation is complete and DNS records have been propagated, Redis automatically generates unique database endpoints:
- Format:
redis-<port>.mycluster.example.com - Example:
redis-12345.mycluster.example.com - No additional DNS configuration is needed for database access.
Verification and Troubleshooting
Use the following CLI tools to verify correct DNS setup:
dig redis-12345.mycluster.example.com host redis-12345.mycluster.example.com nslookup redis-12345.mycluster.example.com
To confirm UDP port 53 is open for DNS queries:
nc -vzu <node_ip> 53
- A success message means the port is open.
- If blocked, check firewall settings on your nodes and DNS server.
Refer to: Redis Port Configurations for more information on port configurations.
DNS FAQ
-
Do I need reverse DNS?
No. Redis doesn't require reverse (PTR) records. -
What’s the TTL for database records?
5 seconds, to allow rapid failover. -
What DNS server does Redis use?
PowerDNS, bundled and pre-configured with Redis. -
Do I need to install PowerDNS manually?
No, Redis handles this internally. -
Is PowerDNS secure?
Yes. It runs as a hardened, non-privileged process with recursion, zone transfers, and unrelated queries disabled.
After DNS Delegation
Once your records are set up and propagated:
- Redis cluster nodes are discoverable by FQDN.
- Databases become reachable using DNS endpoints.
- High-availability features like automatic failover and node migration are enabled.
Alternative: Load Balancer Access
If DNS delegation isn't possible in your environment:
- Set up a load balancer to route traffic to Redis nodes.
- Note: This may limit some Redis features such as shard migration and transparent failover.
Provider-Specific DNS Setup Guides
Each cloud or environment has a tailored article with exact steps. These guides walk through how to configure NS and A records in your specific provider’s UI or CLI tools:
- Setting Up DNS on AWS Route 53
- Setting Up DNS on Azure
- Setting Up DNS on Google Cloud
- Setting Up DNS on Windows Server
- Setting Up DNS with BIND
Onboarding Progress
Previous: Choosing a Cluster Name
Next: Deploying Clusters
Return to the Redis Software Onboarding Overview to view all steps.
0 comments
Please sign in to leave a comment.