Databases 6 min read

Essential Knowledge Points of Redis Cluster

Redis cluster relies on two ports per node, a hash‑slot based sharding scheme, a master‑slave replication model, and provides eventual consistency, making these four fundamentals essential knowledge for developers and operators to.

Full-Stack Internet Architecture
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Essential Knowledge Points of Redis Cluster

Redis cluster is a distributed implementation of Redis that provides high availability and horizontal scalability.

1. Ports used by cluster nodes

Each Redis cluster node uses two TCP ports: the client port (default 6379) and the cluster bus port (default client port + 10000, e.g., 16379). The bus port handles node‑to‑node communication, gossip, failure detection, configuration updates, and failover authorization. Both ports must be reachable for the cluster to function.

2. Data sharding principle

Redis cluster does not use consistent hashing; instead it divides the key space into 16384 hash slots. A key’s slot is computed by taking the CRC16 of the key and modulo 16384. Each node is responsible for a range of slots, e.g., node A handles slots 0‑5500, node B 5501‑11000, node C 11001‑16383. Adding or removing nodes only requires moving the relevant slots.

3. Master‑slave node model

For each hash slot the cluster maintains N replicas (one master and N‑1 slaves). If a master fails, one of its slaves is promoted to master, allowing the cluster to continue serving requests. However, if both a master and all its slaves fail, the slot becomes unavailable.

4. Consistency guarantees

Redis cluster provides eventual consistency, not strong consistency. Writes are acknowledged by the master before being replicated to slaves, so a failure before replication can cause data loss. The optional WAIT command can be used to wait for a configurable number of replicas, reducing but not eliminating the risk.

Understanding these fundamentals is essential for both developers and operations engineers working with Redis clusters.

For more details see the original article Redis cluster features you must not ignore .

shardingHigh AvailabilityRedisMaster‑SlaveClusterconsistency
Full-Stack Internet Architecture
Written by

Full-Stack Internet Architecture

Introducing full-stack Internet architecture technologies centered on Java

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.