Redis Cluster Introduction
Learn about Redis cluster in this lesson.
We'll cover the following...
In the previous section of this course, we discussed many concepts regarding replication and partitioning. Although the concepts seemed simple, it is difficult to handle sharding if the nodes are constantly being added or removed. The Redis cluster is a way to do all of this automatically.
After over four years of development, Redis Cluster was released with the 3.0.0 release of Redis on April 1, 2015. “According to the founder, it is:
“…basically a data sharding strategy, with the ability to reshard keys from one node to another while the cluster is running, together with a failover procedure that makes sure the system is able to survive certain kinds of failures.””
The two major advantages of Redis cluster are:
- The ability to automatically split the dataset among multiple nodes.
- The ability to continue operations when a subset of the nodes are experiencing failures or are unable to communicate with the rest of the cluster.
Redis cluster working
In Redis cluster, each node has two TCP connections open:
- The normal port which is used for client communication, such as 6379. This connection is available to all clients as well as those cluster nodes that need to use client connection for key migration.
- The cluster bus port, which is used by other cluster nodes for failure detection, configuration updates, and fail-over authorization. This channel uses less bandwidth by utilizing a binary protocol for data exchange. This port is always 10000 + the