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

Administration/Clustering: Reference articles about scaling clusters #46

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Feb 26, 2024

@amotl amotl added the cross linking Linking to different locations of the documentation. label Feb 26, 2024
@amotl amotl marked this pull request as ready for review February 26, 2024 23:58
@amotl amotl added the new content New content being added. label Feb 26, 2024
@amotl

This comment was marked as resolved.

@amotl amotl marked this pull request as draft February 27, 2024 13:28
@amotl amotl changed the title Administration/Clustering: Add "Expand Cluster" page Administration/Clustering: Reference articles about scaling clusters Feb 27, 2024
Comment on lines +15 to +20
(scaling-expand)=
## Expand Cluster

The article about [how to add new nodes to an existing cluster] walks you
through the process of scaling up your database cluster, and educates you
about the corresponding details to consider.
Copy link
Member Author

@amotl amotl Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't been able to discover a meaningful/representative code snippet/example on https://community.cratedb.com/t/how-to-add-new-nodes-to-an-existing-cluster/1546, so we just omitted it in this case.

The whole section is a bit thin now, and could be expanded if you have any ideas/suggestions. Otherwise, let's just merge to make progress.

Comment on lines +23 to +57
(scaling-ondemand)=
## On-Demand Scaling

The article about [scaling CrateDB clusters up and down to cope with peaks in
demand] shares knowledge about the [shard allocation filtering] feature of
CrateDB.

Along the lines, it demonstrates how this functionality is applied in a real-
world data management scenario, which is about tuning your database cluster to
cope with high-demand situations.

Prepare adding extra nodes to the database cluster.
```sql
/* Apply routing setting to all existing partitions and new partitions. */
ALTER TABLE test SET ("routing.allocation.exclude.storage" = 'temporarynodes');

/* Configure the setting to be excluded / not applied to _new_ partitions. */
ALTER TABLE ONLY test RESET ("routing.allocation.exclude.storage");
```

Before the high-demand event, properly configure table routing accordingly.
```sql
ALTER TABLE ONLY test SET ("routing.allocation.total_shards_per_node" = 2);
```

To decommission extra database nodes, we need to move the data collected during
the days of the event.
```sql
-- Move the collected data off the extra nodes.
ALTER TABLE test SET ("routing.allocation.exclude.storage" = 'temporarynodes');
ALTER TABLE test RESET ("routing.allocation.total_shards_per_node");

-- Invoke the decommissioning.
ALTER CLUSTER DECOMMISSION 'nodename';
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't hesitate to submit suggestions to improve the wording on both guiding comments, and inline comments. Thanks!

@amotl amotl marked this pull request as ready for review February 27, 2024 14:12
@amotl
Copy link
Member Author

amotl commented Feb 27, 2024

Thanks for approving. In order to bring it in, GH-41 also needs approval, because this patch is stacked upon it.

Base automatically changed from amo/more-content to main February 27, 2024 19:07
@amotl amotl merged commit 500ed8d into main Feb 27, 2024
4 checks passed
@amotl amotl deleted the amo/add-nodes-to-cluster branch February 27, 2024 19:18
@amotl amotl mentioned this pull request Feb 29, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross linking Linking to different locations of the documentation. new content New content being added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants