What impact will it have if the follower's apply speed is faster than the leader node during follower read?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 请问下在follwer read 时候,若follwer 的apply速度比leader节点还还快,会造成啥影响呢?

| username: virvle

If the follower’s apply speed is faster than the leader node during follower read, what impact will it cause?

| username: 有猫万事足 | Original post link

Regarding follower read, the speed of follower apply being faster than the leader has no impact.

If it’s slower, you need to wait for the raft log to be applied up to that point in time. If it’s faster, it means the data on the follower is already up-to-date. You can read directly.

| username: zhaokede | Original post link

There is no impact, all the data is up-to-date.

| username: wangkk2024 | Original post link

Impressive :+1:t2:

| username: YuchongXU | Original post link

No impact.

| username: DBAER | Original post link

It’s the latest version, no impact, even if the leader fails.

| username: xiaoqiao | Original post link

No impact

| username: virvle | Original post link

If the follower apply is slow, should we wait or read from another place?

| username: 小于同学 | Original post link

There is no impact, all the data is up to date.

| username: TiDBer_QYr0vohO | Original post link

No impact.

| username: TiDBer_JUi6UvZm | Original post link

No impact.

| username: TiDBer_ivan0927 | Original post link

No impact, all the data is new.

| username: dba远航 | Original post link

Positive impact, good thing.

| username: 洪七表哥 | Original post link

Follower requires network transmission + apply, while the leader directly applies. Theoretically, this situation should not occur. If it does, it indicates that there might be a serious issue on the leader’s side.

| username: terry0219 | Original post link

Learned.

| username: TiDBer_RjzUpGDL | Original post link

Learned.

| username: Jack-li | Original post link

There is no impact.

| username: TiDBer_21wZg5fm | Original post link

Theoretically, the leader should be faster than the follower, so it doesn’t matter if the follower is faster than the leader.

| username: miya | Original post link

My understanding is that this situation will not occur. Data is always written to the primary region. Setting Follower Read only improves read performance, changing from reading and writing in the primary region to writing still in the primary region, but reading from both the primary and Follower regions.

| username: stephanie | Original post link

This situation shouldn’t occur, right? I read the documentation and it says:
When a TiKV follower node processes a read request, it first uses the Raft ReadIndex protocol to interact with the current leader of the Region to obtain the latest commit index of the current Raft group. After locally applying to the latest commit index obtained from the leader, it can start the normal read request processing flow.
Follower Read | PingCAP Documentation Center