Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Configure a Redis Cluster on Ubuntu (Six-Node Production Layout)

A practical Ubuntu guide to building a six-node Redis Cluster, including per-instance configuration, 16,384-slot bootstrap, cluster-bus firewall ports, MOVED errors, validation, scaling, and failover.
Length9 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To configure Redis Cluster on Ubuntu, run at least three Redis master nodes, put every instance in cluster mode, start all instances, and bootstrap them with redis-cli --cluster create. For a deployment that can tolerate a master failure, use six instances: three masters and one replica for each master. A successful bootstrap ends with [OK] All 16384 slots covered.

The procedure below uses six local ports (7000–7005), explains the cluster-bus firewall rules, shows how to connect without MOVED errors, and covers validation, scaling, failover, persistence, and maintenance.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the cluster topology first

Redis Cluster partitions keys across 16,384 hash slots. Master nodes serve those slots; replicas hold copies of masters and can be promoted during a failure.

Layout Nodes What it provides When to use it
Minimum working cluster 3 masters All slots can be assigned and the cluster can operate as a cluster. Development, functional testing, or a tightly constrained environment.
Recommended deployment shape 3 masters + 3 replicas (6 total) One replica for every master, allowing replica promotion after a master failure. Production-like deployments and serious staging environments.

Redis describes three masters as the minimum cluster that works as expected and recommends six nodes for deployment. Put each master and its replica on separate hosts, availability zones, or other failure domains when your infrastructure permits it. The exact placement depends on your Ubuntu and hosting environment.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Prerequisites and network plan

Prepare Ubuntu hosts

  • Install Redis and the matching redis-cli from the package source appropriate for your Ubuntu release.
  • Reserve one writable data and configuration directory per Redis instance.
  • Decide which address each node will advertise. A multi-host cluster must advertise addresses that every other node and every client can reach; loopback addresses such as 127.0.0.1 are suitable only for a single-machine demonstration.
  • Plan durable storage for the generated cluster state file and persistence files, plus a recovery and backup procedure.

Reserve ports

This example runs instances on client ports 7000 through 7005. Redis Cluster also uses a separate cluster-bus port for node-to-node gossip, failure detection, and other cluster traffic. If you do not set an explicit cluster-port, the bus is the client port plus 10,000: 17,000 for port 7000, 17,001 for 7001, and so on.

Instance Client port Default bus port when cluster-port is unset
Node 1 7000 17000
Node 2 7001 17001
Node 3 7002 17002
Node 4 7003 17003
Node 5 7004 17004
Node 6 7005 17005

Allow client traffic to the ports your applications use and allow both client-port and cluster-bus traffic between every cluster member. Restrict those rules to trusted application and cluster networks rather than exposing Redis broadly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create one Redis instance per port

Make isolated directories

Each instance needs its own configuration, data, log, and generated cluster-state locations. A separate directory also lets every instance use the same relative cluster-config-file name without collisions.

sudo mkdir -p /srv/redis/7000 /srv/redis/7001 /srv/redis/7002 
  /srv/redis/7003 /srv/redis/7004 /srv/redis/7005

Give the Redis service account ownership of the directories and ensure the account can write its persistence and generated node files. The exact service account and filesystem layout vary with the Ubuntu package and your service-management choice.

Write the per-instance configuration

Use this minimal configuration as the baseline for every instance. Change only the port and the paths that must be unique for that instance.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
port 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
  • port is the client port. Set it to 7000, 7001, 7002, 7003, 7004, or 7005 in the corresponding file.
  • cluster-enabled yes turns the instance into a Redis Cluster node.
  • cluster-config-file nodes.conf names the generated cluster configuration file. Redis creates and maintains this file; do not hand-edit it. Keep a separate working directory per instance so files do not overwrite one another.
  • cluster-node-timeout 5000 sets the example node-timeout value to 5,000 milliseconds.
  • appendonly yes enables append-only persistence. Keep the append-only files on durable storage and include them in your recovery plan.

For a real deployment, set each instance’s data and log paths to its own writable directories and configure the addresses it must advertise. Do not copy a generated nodes.conf from one instance to another: node identity is created at runtime and must remain unique.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start all six instances

Start every Redis process with its own configuration before running the cluster-creation command. Use Ubuntu service supervision (or another reliable process manager) so a process restarts after failure and starts in the intended order. Exact package service-unit names are release-specific, so verify the unit and paths supplied by your Ubuntu installation.

Check that each process is listening on its expected client port and that its data directory is writable. Do not bootstrap while one of the six instances is stopped, pointed at the wrong port, or reusing another node’s data directory.

Bootstrap the cluster with redis-cli

Once six empty, correctly configured instances are listening, run the following from a machine that can reach all six client ports:

redis-cli --cluster create 
  127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 
  127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 
  --cluster-replicas 1

Replace the loopback addresses with the advertised, reachable addresses when the nodes are on different hosts. The --cluster-replicas 1 option asks Redis to create one replica for every master. Review the proposed slot and replica allocation, then answer yes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Redis assigns all 16,384 hash slots among the three masters and places one replica behind each master. A successful creation reports:

[OK] All 16384 slots covered

That message means every hash slot has a serving master. It does not by itself prove that your firewall, persistence, client configuration, backups, or failure-domain placement are production-ready.

Local experimentation shortcut

Redis also publishes a utils/create-cluster helper. Its documented local flow is ./create-cluster start, followed by ./create-cluster create; stop or remove the test cluster with ./create-cluster stop or ./create-cluster clean. Use this utility for testing and experimentation. For a deployment that must survive reboots and failures, use explicit service supervision, durable paths, and your normal operational controls.

Validate membership, slots, and reachability

Inspect cluster state

redis-cli -p 7000 cluster info
redis-cli -p 7000 cluster nodes
redis-cli --cluster check 127.0.0.1:7000

cluster info reports the node’s view of cluster health and slot coverage. cluster nodes shows node IDs, roles, addresses, slot ranges, and replica relationships. The --cluster check workflow checks the cluster through a node; use an address reachable from the machine running the command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Repeat checks from the network where your application runs. A cluster can look healthy from localhost while advertising an unroutable private address to remote clients.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Use a cluster-aware connection

redis-cli -c -p 7000

The -c flag enables cluster mode in redis-cli. Application code must use a Redis Cluster-capable library that understands slot maps and redirections. A normal, non-cluster-aware client connected to one shard may receive a MOVED response when a requested key belongs to another shard.

Understand and fix MOVED errors

A MOVED response is a routing instruction, not necessarily a data-loss error. It tells the client that the key’s hash slot is served by another node. Connect with redis-cli -c or configure a cluster-aware library so the client follows the redirection and refreshes its slot map.

  • If the error appears only with a basic client, replace that connection mode with a cluster-capable client.
  • If a cluster-aware client cannot follow the address, check the node’s advertised address, DNS, routing, and firewall rules.
  • If slot ownership is inconsistent, run cluster nodes and redis-cli --cluster check and resolve failed or uncovered nodes before sending application traffic.

Configure Ubuntu firewall rules correctly

Open both classes of traffic. Clients need the Redis client port; cluster members need the cluster-bus port from every other member. With the six-port example and no explicit cluster-port, that means allowing 7000–7005 for application traffic as appropriate and 17000–17005 between cluster nodes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not open the bus to the public internet. Restrict it to the cluster’s private network or explicit member addresses. If you choose a custom cluster-port, document the resulting port map and allow that port instead of relying on the plus-10,000 convention.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Authentication and deployment choices

Manual Ubuntu services

Manual deployment gives you direct control over Ubuntu package and Redis version lifecycles, filesystem layout, service supervision, firewall policy, and upgrade timing. You must also build the surrounding controls: secret distribution, consistent authentication on every node and client, backups, monitoring, failure-domain placement, and scaling procedures.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Juju-orchestrated deployment

Canonical’s Ubuntu tutorial presents Juju as an alternative for AWS, Google Cloud, Azure, and bare-metal environments. Juju can model the deployment, add authentication, and provide a repeatable orchestration workflow. Before choosing it, compare how it handles host count and failure domains, package/version lifecycle, network and firewall automation, secret management, persistence and backup integration, scaling, and observability.

Whichever method you use, configure authentication consistently on every Redis node and in every client. The appropriate ACL or password policy is an organizational security decision; there is no single policy specified by the cluster bootstrap command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scale and maintain the cluster

Add capacity

Redis Cluster scaling is a coordinated operation, not just starting another Redis process. Plan capacity headroom, choose the new node’s failure domain, start it with cluster mode and durable storage, then use the redis-cli --cluster workflows to add the node and assign slots.

Adding a master without moving slots leaves it idle. Use resharding to migrate selected hash slots from existing masters to the new shard, and monitor application latency and replication while the migration runs.

Replace or remove a node

Before removing a master, migrate its slots to healthy masters and confirm that its replica situation is understood. Before removing a replica, verify that the remaining failure tolerance is acceptable. The cluster command workflows support adding and removing nodes, migrating replicas, and resharding; perform them in a maintenance window with a tested rollback plan.

Test failover

Test that a replica can be promoted and that clients reconnect through their cluster-aware routing. Redis documents workflows for testing failover and performing a manual failover. Run these tests before an outage, record the observed client behavior, and verify that the replacement node advertises a reachable address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Upgrade deliberately

Upgrade nodes one at a time or in another sequence that preserves the required replica coverage. Confirm compatibility, persistence, and client behavior before proceeding to the next node. Keep maintenance windows, backups, and a documented rollback path; do not treat a package upgrade as a substitute for a cluster-level upgrade plan.

Persistence, recovery, and operational checks

  • Keep each generated nodes.conf and append-only data set on durable storage. The node configuration file contains cluster identity and state and must not be casually deleted or edited.
  • Include persistence files and the generated cluster configuration in your recovery design. The Redis configuration enables persistence, but backup frequency, retention, encryption, and restore testing remain your responsibility.
  • Monitor slot coverage, node availability, replication relationships, disk capacity, append-only growth, and client error rates.
  • Document every node’s advertised address, client port, bus port, service definition, data path, and failure domain.
  • After any network, firewall, or address change, rerun cluster info, cluster nodes, and redis-cli --cluster check from an application-reachable host.

Troubleshooting checklist

Cluster creation refuses to run

  • Confirm all six instances are running and listening on the ports supplied to redis-cli --cluster create.
  • Ensure the instances are empty cluster nodes, not reused data directories containing an old cluster identity.
  • Check that every process can write its own data directory and generated nodes.conf.
  • Verify that the addresses in the command are reachable from the machine performing bootstrap.

Nodes show as failed or never join

  • Allow both client and cluster-bus traffic between every member.
  • Check the bus calculation: without an explicit cluster-port, it is client port plus 10,000.
  • Replace loopback or otherwise unreachable advertised addresses on multi-host deployments.
  • Compare cluster nodes output on more than one member to detect an inconsistent view.

Clients receive repeated MOVED responses

  • Use redis-cli -c or a Redis Cluster-capable library.
  • Check that the redirected address and port are routable from the client network.
  • Run the cluster check and resolve missing slot coverage or failed nodes.

The cluster survives startup but loses data after a restart

  • Confirm appendonly yes is present in every instance configuration.
  • Verify that append-only files and nodes.conf are stored on persistent, writable storage.
  • Test restoration rather than assuming that enabled persistence alone is a backup.

Pre-production launch checklist

  1. Use at least three masters; use six nodes with one replica per master when failure tolerance is required.
  2. Give every instance a unique client port, isolated directory, and writable durable storage.
  3. Enable cluster mode, generated cluster configuration, a defined node timeout, and persistence on every node.
  4. Advertise addresses reachable by all members and application clients.
  5. Allow client and cluster-bus traffic only on the required private networks.
  6. Bootstrap with --cluster-replicas 1 and verify [OK] All 16384 slots covered.
  7. Validate with cluster-aware clients, cluster info, cluster nodes, and redis-cli --cluster check.
  8. Test replica failover, resharding, node replacement, backups, restores, and upgrades before relying on the cluster.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.