zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

2021-06-24 redis-cluster集群安全性

Redis集群 2021 安全性 24 06 cluster
2023-09-27 14:25:42 时间

摘要:

记录redis的cluster集群安全性

脑图:

核心代码:

从节点主从切换时通知主节点

/* -----------------------------------------------------------------------------
 * CLUSTER manual failover
 *
 * This are the important steps performed by slaves during a manual failover:
 * 1) User send CLUSTER FAILOVER command. The failover state is initialized
 *    setting mf_end to the millisecond unix time at which we'll abort the
 *    attempt.
 * 2) Slave sends a MFSTART message to the master requesting to pause clients
 *    for two times the manual failover timeout CLUSTER_MF_TIMEOUT.
 *    When master is paused for manual failover, it also starts to flag
 *