-
Notifications
You must be signed in to change notification settings - Fork 0
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
Scale: Refurbish section, and absorb relevant tutorials from community forum #150
Conversation
f4b5706
to
ddd1e4d
Compare
3221cc8
to
54da7a7
Compare
docs/admin/clustering/scale/index.md
Outdated
## Advices | ||
|
||
Please apply best-practice operation guidelines when managing your database | ||
cluster. | ||
|
||
:::{tip} | ||
:class: font-larger | ||
|
||
For safely adding or decommission nodes, it is a good idea to | ||
add and remove only one node at a time. | ||
::: | ||
|
||
:::{caution} | ||
:class: font-larger | ||
|
||
When removing nodes from a cluster, you must be conscious about maintaining a | ||
quorum of nodes in the cluster as a whole, even if some nodes would not have | ||
any data. | ||
::: |
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.
That's your suggestions, quickly slapped into the patch, @henrikingo. Please advise about any improvements.
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.
Thanks! I think for the last sentence, it's actually not about just removing nodes. Restarting or shutting down a node would do it too. Other than that this is really good!
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.
Thanks. Do you have a suggestion for a good wording that includes all relevant details concisely?
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.
When restarting, shutting down or removing nodes from a cluster, using the DECOMMISION command... you must be conscious about maintaining a quorum of nodes up and connected to the cluster as a whole, even if some nodes would no longer have any data.
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.
Thank you very much. I've updated the patch using your suggestion.
54da7a7
to
6383cdc
Compare
|
||
We will be able to identify the new nodes by using a custom attribute (`node.attr.storage=temporarynodes`) (see further down for details on how to configure this), so the first step is to configure the existing partitions so that they do not consider the new nodes as suitable targets for shard allocation. | ||
|
||
In CrateDB 5.1.2 or higher we can achieve this with: |
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.
I haven't tested it yet, but since 5.9.0, it shouldn't be needed anymore to change allocation for every single table, but default allocation rules can be set on the cluster level:
Added support to override routing.allocation.* cluster settings with a routing.allocation.* table setting. This can be used to define the default routing behavior for all tables with a cluster setting and reroute individual tables by assigning the table setting using ALTER TABLE SET.
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.
Thanks. So, let's add this as an additional information bit at this very spot, relating to "CrateDB 5.9.0 and higher"? Do you have different suggestions? Please advise.
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.
Hi. 1e60c06 adds a relevant note, see comment below about possibly refining it. Thanks!
c9d9c68
to
e490932
Compare
Refactor `scale-up-down.md` and `kubernetes.rst` page into dedicated section to be able to expand it further.
Co-authored-by: Henrik Ingo <[email protected]>
Co-authored-by: Niklas Schmidtmer <[email protected]>
e490932
to
4e6f5a4
Compare
In CrateDB 5.9.0 or higher, you don't need to change shard allocations for each individual table any longer. Instead, default allocation rules can be set on the cluster level: > [CrateDB 5.9.0] added support to override `routing.allocation.*` cluster > settings with a `routing.allocation.*` table setting. This can be used to > define the default routing behavior for all tables with a cluster setting > and reroute individual tables by assigning the table setting using `ALTER > TABLE SET`.
8f9a86c
to
1e60c06
Compare
In CrateDB 5.1.2 or higher, you can achieve this with: | ||
```sql | ||
/* this applies the setting to all existing partitions and new partitions */ | ||
ALTER TABLE test SET ("routing.allocation.exclude.storage" = 'temporarynodes'); | ||
|
||
/* then we run this other command so that the setting does not apply to new partitions */ | ||
ALTER TABLE ONLY test RESET ("routing.allocation.exclude.storage"); | ||
``` | ||
In CrateDB 5.9.0 or higher, you don't need to change shard allocations for each | ||
individual table any longer. Instead, default allocation rules can be set on | ||
the cluster level: | ||
> [CrateDB 5.9.0] added support to override `routing.allocation.*` cluster | ||
> settings with a `routing.allocation.*` table setting. This can be used to | ||
> define the default routing behavior for all tables with a cluster setting | ||
> and reroute individual tables by assigning the table setting using `ALTER | ||
> TABLE SET`. |
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.
@hammerhead suggested to educate readers about the improvements in CrateDB 5.9.0. Thanks!
Is it sensible to come up with example SQL statements here, similar like the statements above, to emphasize and clarify how a corresponding procedure would work?
NB: With new design elements in the documentation, we have a few more possibilites to convey information in a denser way, or optionally hide it from the main reading flow by using collapsibles. So, don't hesitate to increase the volume of documentation when relaying suggestions. I will try to give them a reasonable layout and formatting. Thanks!
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.
If you are fine with the notice, it will be all good. In this case, please acknowledge.
Otherwise, if you have a few examples at hand, and think adding them would be good, just slap them into a comment, and I will add them to the document at this spot.
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.
Sorry for not approving earlier today, was interrupted
No worries, and thanks. Let's merge the patch now, in order to serve the outcome to our readers in the spirit of release early and often? @hammerhead: Please tell us about any improvements to the section you've suggested, also in retrospective. Thanks! |
About
Rework the whole section about scaling CrateDB Clusters. Feedback is very much welcome.
Preview
Current: https://cratedb.com/docs/guide/admin/clustering/scale-up-down.html
Next: https://cratedb-guide--150.org.readthedocs.build/admin/clustering/scale/
Details
The patch absorbs those tutorials previously published on the community forum. Thanks for your excellent work. 💯 1
References
Footnotes
I will add a bit of polishing to them on behalf of a subsequent iteration, if you don't mind. ↩