Search⌘ K
AI Features

Scaling with Redis Cluster

Explore how Redis Cluster supports horizontal scalability by distributing data across multiple Redis nodes using hash slots and sharding. Understand key concepts including hash tags for multi-key operations and how sharded Pub/Sub in Redis 7.0+ enables scalable messaging within clusters.

Redis Cluster

Because Redis is an in-memory database, the amount of data that can be accommodated depends on the RAM of the host machine. In order to scale beyond the capacity of a single server, we need to distribute the data across several Redis servers.

Redis Cluster
Redis Cluster

Redis Cluster helps by providing horizontal scalability. It ensures that data is automatically partitioned and distributed across the primary Redis nodes. This is also known as sharding. In Redis sharding implementation, every key is a part of a logical hash slot. A Redis Cluster is divided into 16,384 hash slots. To find out the key to hash slot mapping, a deterministic formula can be used, where we first calculate the CRC16 of the key and mod it by 16,384.

Note: A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental ...