-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add PD scheduling best practices and glossary #104
base: master
Are you sure you want to change the base?
Changes from 6 commits
00725b8
504a57e
531abf5
f4ba17b
2b93923
9d8b920
4ce97e6
672c214
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Glossary | ||
summary: Glossaries about TiKV. | ||
menu: | ||
docs: | ||
parent: Concepts | ||
--- | ||
|
||
## L | ||
|
||
### leader/follower/learner | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe these can be split up There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean they can be introduced separately? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think they can be separate entries in this glossary? |
||
|
||
Leader/Follower/Learner each corresponds to a role in a Raft group of [peers](#region-peer-raft-group). The leader services all client requests and replicates data to the followers. If the group leader fails, one of the followers will be elected as the new leader. Learners are non-voting followers that only serves in the process of replica addition. | ||
|
||
## O | ||
|
||
### operator | ||
|
||
An operator is a collection of actions that applies to a region for scheduling purposes. Operators perform scheduling tasks such as "migrate the leader of Region 2 to Store 5" and "migrate replicas of Region 2 to Store 1, 4, 5". | ||
|
||
An operator can be computed and generated by a [scheduler](#scheduler), or created by an external API. | ||
|
||
### operator step | ||
|
||
An operator step is a step in the execution of an operator. An operator normally contains multiple Operator steps. | ||
|
||
## P | ||
|
||
### pending/down | ||
|
||
"Pending" and "down" are two special states of a peer. Pending indicates that the Raft log of followers or learners is vastly different from that of the leader. Followers in pending cannot be elected as leader. "Down" refers to a state that a peer ceases to respond to the leader for a long time, which usually means the corresponding node is down or isolated from the network. | ||
|
||
## R | ||
|
||
### region/peer/Raft group | ||
|
||
Region is the minimal piece of data storage in TiKV, each representing a range of data (96 MiB by default). Each region has three replicas by default. A replica of a region is called a peer. Multiple peers of the same region replicate data via the Raft consensus algorithm, so peers are also members of a Raft instance. TiKV uses Multi-Raft to manage data. That is, for each region, there is a corresponding, isolated Raft group. | ||
|
||
### region split | ||
|
||
Regions are generated as data writes increase. The process of splitting is called region split. | ||
|
||
The mechanism of region split is to use one initial region to cover the entire key space, and generate new regions through splitting existing ones every time the size of the region or the number of keys has reached a threshold. | ||
|
||
## S | ||
|
||
### scheduler | ||
|
||
Schedulers are components in PD that generate scheduling tasks. Each scheduler in PD runs independently and serves different purposes. | ||
|
||
### store | ||
|
||
A store refers to the storage node in the TiKV cluster (an instance of `tikv-server`). Each store has a corresponding TiKV instance. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Best Practices | ||
description: Learn the best practices of TiKV. | ||
menu: | ||
docs: | ||
parent: Tasks | ||
weight: 6 | ||
--- | ||
|
||
The TiKV best practices are detailed through some typical scenarios in the production environment so that you can quickly get started, identify and address problems. | ||
|
||
You can further explore TiKV through the following best practices: | ||
|
||
* [PD scheduling](../pd-scheduling) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reference is more appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think these are some good concept material (reference, too) which users may want to notice easily when they are learning about TiKV.