馬老師netty底層原理與源碼分析
一是它必須維護(hù)與Zookeeper的session(這個(gè)通過Zookeeper的heartbeat機(jī)制來實(shí)現(xiàn))。二是follower必須能夠及時(shí)將leader的writing復(fù)制過來,不能“落后太多”。
leader會(huì)track“in sync”的node list。如果一個(gè)follower宕機(jī),或者落后太多,leader將把它從”in sync” list中移除。這里所描述的“落后太多”指follower復(fù)制的消息落后于leader后的條數(shù)超過預(yù)定值,該值可在$KAFKA_HOME/config/server.properties中配置
#If a replica falls more than this many messages behind the leader, the leader will remo
標(biāo)簽: