Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 关于Follower Read 一些问题
【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】7.1
【Encountered Follower Read Issue: Problem Phenomenon and Impact】
Regarding Follower Read, the official documentation is as follows:
Follower Read | PingCAP Documentation Center
I have some questions:
- This feature looks good and can eliminate read hotspots, but why is it not enabled by default in the cluster? Are there any potential issues?
- If enabled, what target value is generally recommended for tidb_replica_read?
Not entirely, it’s just that the read and write pressure are not together. The read hotspot issue (for many reasons) still exists.
My understanding is that it has scenario limitations and is not suitable for all situations. Follower strong consistency reads can put a lot of pressure in production.
Looking at the principle, follower read shouldn’t involve many mechanism adjustments.
I guess it might be that writing to 2 out of 3 replicas is considered successful, which means there will definitely be a slow follower that needs to wait. It probably sacrifices latency to improve read performance.
Additionally, there is an overhead of accessing the leader before the follower provides the data, which will increase the latency.
If the apply index of the follower node is applied quickly, can it avoid the issue of the follower read reading data newer than the leader’s? To ensure that the data read has been applied on the leader node, does it require at least one more network interaction to know the leader’s apply status?