1. Fault discovery: Fault discovery can be realized through the disappearance of ping/pong: Sentinel is not required, and fault discovery can be divided into subjective offline and objective offline.

2. Fault recovery:

2.1 Qualification Examination

Check the disconnection time between each secondary node and the faulty primary node. 2. Disqualification after cluster-node-timeout* cluster-slave-validity-fator 3Copy the code

2.2 Preparing election time

2.3 Election Voting

2.4 Replacing the Primary Node

Q&A

1. Cluster completion

Cluster-require-full-coverage default yes, 16384 slots are allocated to ensure integrity, but during failover and data migration, some slots are not allocated temporarily, resulting in other slots in the cluster cannot be used. Most services are not tolerated, so set this parameter to no

2. Bandwidth consumption

Official recommendation: 1000 nodes, ping/pong consumes a certain amount of bandwidth. The length of cluster-node-timeout also affects the bandwidth. The longer the cluster-node-timeout, the lower the bandwidth consumption

3. Publish and subscribe broadcasts

4. Data skew

5. Read and write separation

6. Migrate data

7. Compare the cluster and single node