Database / REDIS
What is Redis Cluster?
Redis Cluster is Redis's built-in solution for horizontally scaling data across multiple nodes — instead of one server holding the entire dataset, the keyspace is split into 16,384 fixed hash slots, and those slots are distributed across the cluster's master nodes, each of which can also have its own replicas for high availability.
redis-cli -c -h node1 -p 7000 CLUSTER INFO CLUSTER SLOTS
A key's slot is computed by hashing the key (or the content inside {} braces if the key uses hash tags, which lets related keys be forced onto the same slot for multi-key operations). Clients need to be cluster-aware, since a request for a key can be redirected (via a MOVED response) to whichever node currently owns that key's slot. This design is what lets Redis Cluster scale write throughput and total dataset size well beyond a single instance's memory, at the cost of added operational complexity and some restrictions — multi-key operations only work if all involved keys map to the same slot, and numbered databases beyond database 0 aren't supported.
More Related questions...
