From ede8ea004f0651f8a044f38a2bd1fe75ef508ab6 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 25 Feb 2020 11:00:43 +0800 Subject: [PATCH 1/4] reference/performance: correct replica selection policy of follower read --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index 91a27a3feec73..c952cfe1af35b 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,4 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Although TiKV can select any follower replica to handle any read request, considering the different replication speed among followers, if the load balancing granularity is too fine, it might cause significant fluctuation of latency. Currently, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From 270769e7cb5826bf5c2f42749fde4f8221cc1a12 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 16:32:48 +0800 Subject: [PATCH 2/4] sync with docs-cn changes https://github.com/pingcap/docs-cn/pull/2311 --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index c952cfe1af35b..0cb0bcb4808e8 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,4 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB connection on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. Conversely, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From e8cbc6b73d3c525a5e25f8b6842adc39e2f8d8ea Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 17:00:27 +0800 Subject: [PATCH 3/4] Update reference/performance/follower-read.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- reference/performance/follower-read.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index 0cb0bcb4808e8..d2acd9bd4e320 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,6 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB connection on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. Conversely, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. + +However, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From 5c08a4fffd63dc28a69b0d8ffcc4878c026b555b Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 17:36:15 +0800 Subject: [PATCH 4/4] deleted a trailing space --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index d2acd9bd4e320..6872b3ca5f8c4 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,6 +47,6 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. However, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted.