Cluster introduction
Cluster introduced by Redis 3.0. Cluster is a redis distributed implementation with automatic data fragmentation, fault tolerance, significant elevation for read speed, improved aof rewriting, and so on.
A Redis cluster is a distributed (distributed), fault tolerant (fault-tolerant) Redis implementation that can be used by a cluster as a subset (subset) of the functionality that ordinary single-machine Redis can use.
There is no central node or proxy node in the Redis cluster, and one of the main design goals of the cluster is to achieve linear scalability (linear scalability).
Redis Cluster sacrifices a part of the fault tolerance for consistency (consistency): The system maintains data consistency as much as possible with limited (limited) resistance to network disconnection (net split) and node failure.
The cluster features currently supported
Node Auto discovery
Slave->master elections, cluster fault tolerance
Hot resharding: Online sharding
Cluster Management
Configuration-based (nodes-port.conf) cluster management
ASK steering/moved steering mechanism.
Redis Cluster architecture
Architectural Details:
(1) All Redis nodes are interconnected (ping-pong mechanism), using binary protocols internally to optimize transmission speed and bandwidth.
(2) The fail of the node is effective only when the detection of more than half of the nodes in the cluster fails.
(3) The client is directly connected to the Redis node and does not require an intermediate proxy layer. The client does not need to connect to all nodes in the cluster and connects to any of the available nodes in the cluster
(4) Redis-cluster maps all the physical nodes to the [0-16383]slot, cluster is responsible for maintaining Node<->slot<->value
Redis-cluster elections: Fault tolerance
(1) The election process is all master in the cluster, if more than half of the master node communicates with the master node timeout (cluster-node-timeout), the current master node is considered to be dead.
(2): When is the entire cluster unavailable (Cluster_state:fail)?
A: If any master of the cluster is hung, and the current master is not slave. The cluster enters the fail state, it can also be understood that the cluster's slot mapping [0-16383] does not complete when it enters the fail state. Ps:redis-3.0.0.rc1 joins the Cluster-require-full-coverage parameter, which is turned off by default and the cluster compatibility section fails to open.
B: If more than half of the cluster master hangs, regardless of whether there is a slave cluster into the fail state.
PS: When the cluster is unavailable, all operations on the cluster are not available, received ((error) Clusterdown the cluster is down) error
Reference
http://redisdoc.com/
Redis Cluster Related data