-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Development description
This feature is used to improve the availability on Read workloads when there exists slow nodes in the TiKV cluster.
In current stage, in a single AZ, the Read availability will be damaged when there exists slow TiKV nodes whose processing progress is delayed or hung by CPU / Disk IO, even though we have optional "ReplicaReadMode == Leader || Follower || LeaderAndFollower" to redirect Read flows to other nodes. And we do not have an accessible way to recognize slow nodes, making Read flows not to be redirected to these nodes.
So, I try to introduce a simple way / algorithm to detect slow nodes in TiKV cluster(just for TiKV nodes, currently not compatible to TiFlash nodes). And when there exists slow nodes, Client can perceive these slow nodes and do not send Read flows to these nodes to try it best to keep the high availabilities on Read requests. I just call it AutoFollowerRead.
Meanwhile, given that there already exists on Read mode -- ReplicaReadMode == LeaderAndFollower with Round-Robin algorithm to balance Read flows, I just wanna introduce AutoFollowerRead into a new read mode PreferLeader for convenient. That is, AutoFollowerRead is introduced as an enhancement on ReplicaReadMode == PreferLeader.