how-to: add placement rule guide#2171
Merged
Merged
Conversation
disksing
reviewed
Apr 7, 2020
|
|
||
| # Placement Rules | ||
|
|
||
| Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes such as the number of replicas of any continuous data range, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. |
Contributor
There was a problem hiding this comment.
storage location, host type, 后面这些跟 number of replicas 是并列关系的,都是一种 attribute。这么改行不行?
Suggested change
| Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes such as the number of replicas of any continuous data range, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. | |
| Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes of any continuous data range, such as the number of replicas, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. |
| | `GroupID` | `string` | The group ID that marks the source of the rule. | | ||
| | `ID` | `string` | The unique ID of a rule in a group. | | ||
| | `Index` | `int` | The stacking sequence of rules in a group. | | ||
| | `Override` | `true`/`false` | The smaller rule that determines whether to overwrite index (in a group). | |
Contributor
There was a problem hiding this comment.
Whether to overwrite rule with smaller index (in a group)
| enable-placement-rules = true | ||
| ``` | ||
|
|
||
| In this way, PD enables this feature after the cluster is successfully initialized and generates corresponding rules according to the `max-replicas` and `location-labels` configurations: |
Contributor
There was a problem hiding this comment.
initialized -> bootstrapped
| } | ||
| ``` | ||
|
|
||
| For a initialized cluster, you can also enable Placement Rules online through pd-ctl: |
| } | ||
| ``` | ||
|
|
||
| ### Place five replicas in three data centers in the proportion of two-two-one, and the Leader should not be in the third data center |
Contributor
There was a problem hiding this comment.
two-two-one -> 2-2-1 or 2:2:1?
disksing
approved these changes
Apr 7, 2020
sre-bot
pushed a commit
to sre-bot/docs
that referenced
this pull request
Apr 7, 2020
* how-to: add placement rule guide * fix typos * address comments from disksing * how-to: update wording and format * how-to: update and fix description Co-authored-by: Lilian Lee <lilin@pingcap.com>
5 tasks
Contributor
|
cherry pick to release-4.0 in PR #2185 |
lilin90
added a commit
that referenced
this pull request
Apr 7, 2020
* how-to: add placement rule guide * fix typos * address comments from disksing * how-to: update wording and format * how-to: update and fix description Co-authored-by: Lilian Lee <lilin@pingcap.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> Co-authored-by: Lilian Lee <lilin@pingcap.com>
5 tasks
5 tasks
sre-bot
pushed a commit
to sre-bot/docs
that referenced
this pull request
Jun 11, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
5 tasks
Contributor
|
cherry pick to release-3.1 in PR #2810 |
TomShawn
added a commit
that referenced
this pull request
Jun 16, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is changed, added or deleted? (Required)
Add placement rules configuratoin guide.
Which TiDB version(s) do your changes apply to? (Required)
If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.
What is the related PR or file link(s)?