Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incubating Program: Follower Read With Applied Index #86

Closed
6 of 9 tasks
hicqu opened this issue Nov 20, 2019 · 5 comments
Closed
6 of 9 tasks

Incubating Program: Follower Read With Applied Index #86

hicqu opened this issue Nov 20, 2019 · 5 comments
Labels
incubating-request/feature This is an Incubating Program request for a feature status/LGT2 Indicates that a PR has LGTM 2.

Comments

@hicqu
Copy link

hicqu commented Nov 20, 2019

Follower Read With Applied Index

Describe the feature or project you want to incubate:

Summary

This RFC proposes a improvement about getting snapshot on followers, which is
if the read request carries an applied index, the peer can get snapshot locally
wihtout any commucation with its leader, if only it has applied to the given
index. It's useful to reduce latency if the cluster is deployed in multi
datacenters.

Motivation

For clusters deployed in multi datacenters, the system latency could mainly
depend on the network RTT between datacenters. For example, suppose PDs are
deployed in Beijing, and TiKVs are deployed in Beijing and Xian (for high
availability). If a client which is near to Xian wants to read a region, it
needs to get a transaction timestamp from PDs (in Beijing), and then sends
requests to TiKVs in Beijing or Xian. For the latter case, TiKVs in Xian will
send read index requests to their leaders (in Beijing) internally, which still
involves a RTT crossing datacenters.

So, If we can add some proxies in the major datacenter, and let it help TiDBs
in Xian to get transaction timestamp and applied indices of all target regions,
the read latency between multi datacenter will be reduced from 2 RTT to 1 RTT.

Your RFC/Proposal?

tikv/rfcs#32
tikv/rfcs#33

Tracking list

  • Article about the improvement (done)

TiKV tasks about follower read with applied index

TiDB tasks about follower read with applied index

Tasks about follower replication

@winkyao winkyao changed the title Follower Read With Applied Index RFC: Follower Read With Applied Index Nov 20, 2019
@winkyao winkyao added incubating-request/feature This is an Incubating Program request for a feature and removed Incubating Program labels Nov 20, 2019
@winkyao winkyao changed the title RFC: Follower Read With Applied Index Follower Read With Applied Index Nov 20, 2019
@qiuyesuifeng qiuyesuifeng changed the title Follower Read With Applied Index Incubating Program: Follower Read With Applied Index Nov 20, 2019
@winkyao
Copy link
Contributor

winkyao commented Nov 22, 2019

LGTM

@winkyao winkyao added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 23, 2019
@qiuyesuifeng
Copy link
Member

LGTM

1 similar comment
@zz-jason
Copy link
Member

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 24, 2019
AndreMouche pushed a commit to AndreMouche/community that referenced this issue Nov 6, 2020
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
@tisonkun
Copy link
Contributor

tisonkun commented Sep 3, 2021

@hicqu @zz-jason is this feature released or stopped?

@hicqu hicqu closed this as completed Sep 18, 2021
@hicqu
Copy link
Author

hicqu commented Sep 18, 2021

Closed by pingcap/tidb#21094.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incubating-request/feature This is an Incubating Program request for a feature status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

No branches or pull requests

5 participants