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

tidb cloud: add tidb node groups docs #19713

Merged
merged 40 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ee7cc39
add tidb node groups docs
hfxsd Dec 16, 2024
dc8d301
fix errors
hfxsd Dec 16, 2024
8665975
fix errors
hfxsd Dec 16, 2024
ecbdf24
refined wording
hfxsd Dec 17, 2024
796a53d
Update tidb-node-group-table-view.png
hfxsd Dec 17, 2024
b013dae
Update optimize-resource-allocation.md
hfxsd Dec 17, 2024
ce8b954
Update optimize-resource-allocation.md
hfxsd Dec 17, 2024
a9b00a8
Update optimize-resource-allocation.md
hfxsd Dec 17, 2024
4e8c0bc
Update optimize-resource-allocation.md
hfxsd Dec 17, 2024
7b427af
Update optimize-resource-allocation.md
hfxsd Dec 17, 2024
0f9d12a
Update tidb-node-group-management.md
hfxsd Dec 17, 2024
eb0c23f
Update TOC-tidb-cloud.md
hfxsd Dec 17, 2024
2d50cbc
updated via console UI
hfxsd Dec 17, 2024
2ef6411
Update tidb-node-group-management.md
hfxsd Dec 17, 2024
1aef43c
Apply suggestions from code review
hfxsd Dec 17, 2024
1c186fa
Update tidb-cloud/tidb-node-group-management.md
hfxsd Dec 17, 2024
122b68b
Update tidb-cloud/optimize-resource-allocation.md
hfxsd Dec 17, 2024
5879cff
Apply suggestions from code review
hfxsd Dec 17, 2024
8170024
Apply suggestions from code review
hfxsd Dec 19, 2024
8990927
refined
hfxsd Dec 19, 2024
6a74d04
Update tidb-cloud/tidb-node-group-management.md
hfxsd Dec 19, 2024
40ae7b4
Update tidb-cloud/tidb-node-group-overview.md
hfxsd Dec 19, 2024
3652290
Update tidb-cloud/tidb-node-group-management.md
hfxsd Dec 19, 2024
e6ad3b6
Update tidb-cloud/tidb-node-group-management.md
hfxsd Dec 19, 2024
6e77ffd
Update tidb-cloud/tidb-node-group-management.md
hfxsd Dec 19, 2024
53f2ef6
Apply suggestions from code review
hfxsd Dec 19, 2024
6dee30f
Apply suggestions from code review
hfxsd Dec 20, 2024
d44758e
Apply suggestions from code review
hfxsd Dec 20, 2024
aeff870
Update implementation-of-tidb-node-group.png
hfxsd Dec 20, 2024
496e77c
Apply suggestions from code review
hfxsd Dec 23, 2024
92d538c
Apply suggestions from code review
hfxsd Dec 23, 2024
66082a7
Update TOC-tidb-cloud.md
hfxsd Dec 24, 2024
09617ee
Update TOC-tidb-cloud.md
hfxsd Dec 24, 2024
f9965a2
Apply suggestions from code review
hfxsd Dec 24, 2024
aedbf12
Apply suggestions from code review
hfxsd Dec 24, 2024
3093cf6
Apply suggestions from code review
hfxsd Dec 25, 2024
689fdea
Apply suggestions from code review
hfxsd Dec 25, 2024
3a7adbe
delete view screenshots
hfxsd Dec 25, 2024
de01327
Apply suggestions from code review
hfxsd Dec 25, 2024
5ffe968
Apply suggestions from code review
hfxsd Dec 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@
- [Overview](/garbage-collection-overview.md)
- [Configuration](/garbage-collection-configuration.md)
- [Tune TiFlash Performance](/tiflash/tune-tiflash-performance.md)
- Optimize Resource Allocation
- [Overview of Resource Allocation](/tidb-cloud/optimize-resource-allocation.md)
- [Resource Control](/tidb-resource-control.md)
- TiDB Node Group
- [Overview of TiDB Node Group](/tidb-cloud/tidb-node-group-overview.md)
- [Manage TiDB Node Groups](/tidb-cloud/tidb-node-group-management.md)
- [Upgrade a TiDB Cluster](/tidb-cloud/upgrade-tidb-cluster.md)
- [Delete a TiDB Cluster](/tidb-cloud/delete-tidb-cluster.md)
- Migrate or Import Data
Expand Down Expand Up @@ -741,7 +747,6 @@
- [upgrade](/tidb-cloud/ticloud-upgrade.md)
- [help](/tidb-cloud/ticloud-help.md)
- [Table Filter](/table-filter.md)
- [Resource Control](/tidb-resource-control.md)
- [URI Formats of External Storage Services](/external-storage-uri.md)
- [DDL Execution Principles and Best Practices](/ddl-introduction.md)
- [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tidb-cloud/tidb-node-group-change-name.png
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this image

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tidb-cloud/tidb-node-group-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tidb-cloud/tidb-node-group-delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tidb-cloud/tidb-node-group-table-view.png
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this image

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tidb-cloud/tidb-node-group-window-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions tidb-cloud/optimize-resource-allocation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Optimize Resource Allocation for TiDB Cloud Dedicated
summary: Learn about how to optimize your resource allocation for TiDB Cloud Dedicated clusters.
---

# Optimize Resource Allocation for TiDB Cloud Dedicated

As a Hybrid Transactional and Analytical Processing (HTAP) database, [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) clusters can support multiple business applications, each with different quality of service (QoS) requirements. In some cases, you might need to allocate more resources to high-priority applications to maintain acceptable latency levels.

TiDB Cloud Dedicated offers resource optimization features, including [Resource Control](/tidb-resource-control.md) and the [TiDB Node Group](/tidb-cloud/tidb-node-group-overview.md) feature. These features help you allocate resources efficiently in multi-business scenarios.

## Use Resource Control

[Resource Control](/tidb-resource-control.md) lets you divide the storage nodes (TiKV or TiFlash) of a TiDB Cloud Dedicated cluster into multiple logical groups. In systems with mixed workloads, you can assign workloads to separate resource groups to ensure resource isolation and meet QoS requirements.

If the cluster experiences unexpected SQL performance issues, you can use [SQL bindings](/sql-statements/sql-statement-create-binding.md) or [manage runaway queries](/tidb-resource-control.md#manage-queries-that-consume-more-resources-than-expected-runaway-queries) alongside resource groups to temporarily limit the resource consumption of specific SQL statements.

By using Resource Control effectively, you can reduce the number of clusters, simplify operations and maintenance, and lower management costs.

## Use TiDB Node Group

The [TiDB Node Group](/tidb-cloud/tidb-node-group-overview.md) feature physically groups the computing nodes (TiDB layer) of a TiDB Cloud Dedicated cluster. Each group is configured with a specific number of TiDB nodes, ensuring the physical separation of computing resources between groups.

You can divide computing nodes into multiple TiDB node groups based on business requirements and assign unique connection endpoints to each group. Your applications connect to the cluster through their respective endpoints, and requests route to the corresponding node group for processing. This ensures that resource overuse in one group does not affect other groups.

## Choose between Resource Control and TiDB Node Group

You can use Resource Control, the TiDB Node Group feature, or a combination of both based on your application needs and budget to achieve resource isolation.

The following table compares the features of Resource Control and TiDB Node Group:

| Comparison item | Resource Control | TiDB Node Group |
|--------------------------|---------------------------|------------------------|
| Isolation level | TiKV or TiFlash logical layer | TiDB node physical layer |
| Flow control | Controls the flow of user read and write requests based on quotas set for resource groups. | Not supported. |
| Configuration method | Configured using SQL statements | Configured through the TiDB Cloud console |
| Distinguishing workloads | Supports binding resources at the following levels: <ul><li>User level.</li><li>Session level (set the resource group per session). </li><li>Statement level (set the resource group per statement).</li></ul>| Provides different connection endpoints for different workloads. |
| Cost | No extra cost | Cost associated with adding TiDB nodes, but no extra cost for creating TiDB node groups. |
161 changes: 161 additions & 0 deletions tidb-cloud/tidb-node-group-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
---
title: Manage TiDB Node Groups
summary: Learn about how to manage TiDB node groups and their endpoints to isolate your business workload.
---

# Manage TiDB Node Groups

This document describes how to manage TiDB node groups and their endpoints to isolate your business workload using the [TiDB Cloud console](https://tidbcloud.com/).

> **Note**:
>
> The TiDB Node Group feature is **NOT** available for TiDB Cloud Serverless clusters.

Currently, the TiDB Node Group feature is only available upon request. To request this feature, perform the following steps:

1. Log in to the [TiDB Cloud console](https://tidbcloud.com).
2. Click **?** in the lower-right corner.
3. Click **Request Support**.
4. In the **Subject** field, fill in **Apply for TiDB Node Group feature**.
5. Click **Submit**.

## Terms

- TiDB Node Group: A TiDB node group manages the grouping of TiDB nodes and maintains the mapping between endpoints and TiDB nodes.

- Each TiDB node group has a unique endpoint.
- When you delete a TiDB node group, the related network setting (such as private link and IP access list) will be deleted too.

- Default Group: When a cluster is created, a default TiDB node group is created. Therefore, each cluster has a default group. The default group cannot be deleted.

## Prerequisites

- You have a [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) cluster deployed on AWS.
- You are in the **Organization Owner** or **Project Owner** role of your organization. For more information, see [User roles](/tidb-cloud/manage-user-access.md#user-roles).

## Create a TiDB node group

To create a TiDB node group, perform the following steps:

1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page of your project, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Nodes**.
3. Click **Modify** in the upper-right corner. The **Modify Cluster** page is displayed.
4. On the **Modify Cluster** page, click **+** to add a new TiDB node group as follows. You can also use the default group directly.

- TiDB
- **vCPU + RAM**: choose the [TiDB size](/tidb-cloud/size-your-cluster.md#size-tidb) you need. Only TiDB nodes with 8 vCPU and 16 GiB memory or higher specifications are supported.
- **Node Groups**: click **+** to create a new TiDB node group. You can also use the default group and enter the number of TiDB nodes in the **DefaultGroup** field.

- TiKV
- **vCPU + RAM**: choose the [TiKV size](/tidb-cloud/size-your-cluster.md#size-tikv) you need.
- **Storage x Nodes**: choose the storage size and the number of TiKV nodes.

- TiFlash (optional)
- **vCPU + RAM**: choose the [TiFlash size](/tidb-cloud/size-your-cluster.md#size-tiflash) you need.
- **Storage x Nodes**: choose the storage size and the number of TiFlash nodes.

![Create TiDB Node Group](/media/tidb-cloud/tidb-node-group-create.png)

5. New TiDB nodes are added along with the new TiDB node group, which affects the cluster's billing. Review the cluster size in the right pane, then click **Confirm**.

By default, you can create up to five TiDB node groups for a TiDB Cloud Dedicated cluster. If you need more groups, contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md).

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
If you create a TiDB node group but still use the endpoint of the default group to connect to the cluster, the TiDB nodes in the TiDB node group will not take any workload, which is a waste of the resource. You need to create new connection to the TiDB nodes in the new TiDB node group. See [Connect to a TiDB node group](#connect-to-a-tidb-node-group).

## Connect to a TiDB node group

### Connect via public connection

Public connection for the new TiDB node group is disabled by default. You need to enable it first.

To enable public connection, do the following:

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the upper-right corner, click **Connect**. A connection dialog is displayed.
3. Choose the new TiDB node group and the **Public** connection type.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
4. Click **Configure the IP Access** List.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
5. On the **Networking** page, select the TiDB node group in the upper-right corner.
6. Enable the public endpoint and add the IP access list.
7. In the up-right corner of the page, click **Connect**, and you can get the connection string.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Connect to the new TiDB node group via Public Endpoint](/media/tidb-cloud/tidb-node-group-connect-public-endpoint.png)

For more information, see [Connect to TiDB Cloud Dedicated via Public Connection](/tidb-cloud/connect-via-standard-connection.md).

### Connect via private endpoint

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the upper-right corner, click **Connect**. A connection dialog is displayed.
3. Choose the new TiDB node group and **Private Endpoint** connection type.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
4. In the left navigation pane, click **Networking**. On the **Networking** page, select the TiDB node group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
5. Click **Create Private Endpoint Connection** to create a new connection for this node group. For more information, see [Connect to a TiDB Cloud Dedicated Cluster via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections.md).

> **Note**:
>
> If you use Private Link to connect different node groups, you need to create separated private endpoint connection for each node group.

6. After you create the private endpoint connection, click **Connect** on the up-right of the page to get the connection string.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

### Connect via VPC peering

Because the cluster is in one VPC and all the TiDB node groups share the same VPC, you only need to create one VPC peering, then all the groups can use it.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. Follow the instructions in [Connect to TiDB Cloud Dedicated via VPC Peering](/tidb-cloud/set-up-vpc-peering-connections.md) to create a VPC peering for this cluster.
2. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
3. In the left navigation pane, click **Networking**.
4. On the **Networking** page, click **Connect** on the up-right to get the connection string.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## View TiDB node groups

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
To view the details of TiDB node groups, perform the following steps:

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Nodes** to view the list of TiDB node groups.

![TiDB node group window view](/media/tidb-cloud/tidb-node-group-window-view.png)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

To switch to the table view, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 -4 24 24" stroke-width="1.5"><path d="M3 9.5H21M3 14.5H21M7.8 4.5H16.2C17.8802 4.5 18.7202 4.5 19.362 4.82698C19.9265 5.1146 20.3854 5.57354 20.673 6.13803C21 6.77976 21 6.61984 21 8.3V15.7C21 17.3802 21 17.2202 20.673 17.862C20.3854 18.4265 19.9265 18.8854 19.362 19.173C18.7202 19.5 17.8802 19.5 16.2 19.5H7.8C6.11984 19.5 5.27976 19.5 4.63803 19.173C4.07354 18.8854 3.6146 18.4265 3.32698 17.862C3 17.2202 3 17.3802 3 15.7V8.3C3 6.61984 3 6.77976 3.32698 6.13803C3.6146 5.57354 4.07354 5.1146 4.63803 4.82698C5.27976 4.5 6.11984 4.5 7.8 4.5Z" stroke="currentColor" stroke-width="inherit" stroke-linecap="round" stroke-linejoin="round"></path></svg>.

## Modify a TiDB node group

You can modify the group name and node configurations in the group.

### Change the group name

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
To change the group name, perform the following steps:

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Nodes**.
3. Click <svg width="16" height="16" viewBox="0 -2 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 20H21M3.00003 20H4.67457C5.16376 20 5.40835 20 5.63852 19.9447C5.84259 19.8957 6.03768 19.8149 6.21663 19.7053C6.41846 19.5816 6.59141 19.4086 6.93732 19.0627L19.5001 6.49998C20.3285 5.67156 20.3285 4.32841 19.5001 3.49998C18.6716 2.67156 17.3285 2.67156 16.5001 3.49998L3.93729 16.0627C3.59139 16.4086 3.41843 16.5816 3.29475 16.7834C3.18509 16.9624 3.10428 17.1574 3.05529 17.3615C3.00003 17.5917 3.00003 17.8363 3.00003 18.3255V20Z" stroke="currentColor" stroke-width="inherit" stroke-linecap="round" stroke-linejoin="round"/></svg> **Edit** and enter a new name for the TiDB node group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

### Update the node configuration

To update TiDB, TiKV, or TiFlash node configurations in the group, perform the following steps:

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Nodes**.
3. On the **Node Map** page, click **Modify** in the upper-right corner. The **Modify Cluster** page is displayed.
4. On the **Modify Cluster** page, you can:

- Change the number of TiDB nodes.
- Add new node groups.
- Update the size and **Storage x Nodes** configuration for TiKV and TiFlash nodes.

![Change TiDB node group node count](/media/tidb-cloud/tidb-node-group-change-node-count.png)

## Delete a TiDB node group

> **Note**:
>
> When you delete a TiDB node group, its nodes and network configurations are also removed, including private endpoint connections and the IP list for public access.

To delete a TiDB node group, perform the following steps:

1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Nodes**.
3. On the **Node Map** page, click **Modify** in the upper-right corner. The **Modify Cluster** page is displayed.
4. On the **Modify Cluster** page, click <svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6" stroke="currentColor" stroke-width="inherit" stroke-linecap="round" stroke-linejoin="round"/>
</svg>**Delete** to delete the TiDB node group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Delete the TiDB node group](/media/tidb-cloud/tidb-node-group-delete.png)
Loading
Loading