Manage shards and nodes
A shard distributes data in a cluster where cluster mode is enabled and consists of Primary and Replica nodes. A node is a VM (Virtual Machine) in a MemStore cluster and has either the Primary or Replica role.
The following sections explain how to view and manage shards and nodes in MemStore.
When cluster mode is enabled
When cluster mode is enabled, data is distributed by shard. You can view and manage shards and their nodes together.
View shards and nodes
On the Shard/Node tab, you can view the shard list and the nodes in each shard.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster whose details you want to view.
- View the information on the Shard/Node tab.
- Shard table
| Category | Item | Description |
|---|---|---|
| Menu button | Copy all endpoints | Copies all node endpoints in the cluster, separated by line breaks |
| Add shard | Adds a shard to the cluster | |
| Table button | Add node | Adds a Replica node to the selected shard |
| Delete | Deletes the selected shard - A shard cannot be deleted if the cluster has the minimum number of shards | |
| Shard list | Shard name | Automatically assigned name - Format: {cluster name} + {nnn} |
| Status | Shard status - For details, see Shard | |
| Node count | Number of nodes in the shard | |
| Slot | Slot range assigned to the shard | |
| Uptime | Time elapsed since shard creation started | |
| Created at | Date and time when the shard was created |
- Node table
| Category | Item | Description |
|---|---|---|
| Node list | Node name | Automatically assigned name - Format: {cluster name} + {nnn} + {nnn} |
| Role | Role assigned to the node - For details, see Node | |
| Status | Node status - For details, see Node | |
| Engine version | Engine version selected when the cluster was created | |
| Node type | Node type | |
| Subnet | User subnet selected when the cluster was created | |
| Availability zone | Availability zone where the node was created | |
| Endpoint | Endpoint for connecting to the cluster | |
| Uptime | Time elapsed since node creation started | |
| Created at | Date and time when the node was created | |
| Promote | Promotes the selected Replica node to Primary - Available only for Valkey; a Primary node cannot be promoted | |
| Delete icon | Delete node | Deletes the selected node - A Primary node cannot be deleted |
Manage shards and nodes
Adding or deleting a shard moves slots and can take several hours to complete.
Add a shard
You can add a shard to a cluster.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster to which you want to add a shard.
- On the Shard tab, click [Add shard].
- In the popup, confirm the selected cluster, select the subnet for the nodes, and click [Add].
- Confirm that the cluster status changes to
Scaling(horizontal)and returns toRunningwhen complete.
Delete a shard
You can delete a shard that is no longer needed. Deleting a shard also deletes all nodes in it, and deleted resources cannot be recovered. You cannot delete a shard if a Valkey cluster has three shards or a Redis OSS cluster has one shard.
Deleted shard and node resources are permanently released and cannot be recovered.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster from which you want to delete a shard.
- On the Shard tab, select the shard and click [Delete shard].
- In the popup, enter Permanent deletion and click [Delete].
- Confirm that the shard no longer appears on the cluster details page.
Add a node
You can add a node to the selected shard. The new node is assigned the Replica role without service interruption.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster to which you want to add a node.
- On the Shard tab, select the shard and click [Add node].
- In the popup, confirm the selected cluster, select the subnet for the node, and click [Add].
- Confirm that the node appears on the cluster details page.
Delete a node
You can delete a node that is no longer needed. You cannot delete a Primary node or delete a node if the shard has only two nodes.
Deleted node resources are permanently released and cannot be recovered.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster containing the node to delete.
- On the Shard tab, click Delete for the node.
- In the popup, enter Permanent deletion and click [Delete].
- Confirm that the node no longer appears on the cluster details page.
When cluster mode is disabled
When cluster mode is disabled, the cluster uses a single-shard structure in which you can view and manage nodes.
View nodes
On the Node list tab, you can view the nodes in the cluster.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster whose details you want to view.
- View the information on the Node list tab.
| Category | Item | Description |
|---|---|---|
| Menu button | Add node | Adds a Replica node to the selected cluster |
| Table button | Promote | Promotes the selected Replica node to Primary - A Primary node cannot be promoted |
| Delete icon | Deletes the selected node - A Primary node cannot be deleted | |
| Name | Automatically assigned name - Format: {cluster name} + {nnn} | |
| Role | Role assigned to the node - For details, see Node | |
| Status | Node status - For details, see Cluster | |
| Engine version | Engine version selected when the cluster was created | |
| Node type | Node type | |
| Subnet | User subnet selected when the cluster was created | |
| Availability zone | Availability zone where the node was created | |
| Endpoint | Endpoint for connecting to the cluster | |
| Uptime | Time elapsed since node creation started | |
| Created at | Date and time when the node was created |
Manage nodes
Add a node
You can add a node to a cluster. The new node is assigned the Replica role without service interruption.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster to which you want to add a node.
- On the Node list tab, click [Add node].
- In the popup, confirm the selected cluster and click [Add].
- Confirm that the cluster status changes to
Scaling(horizontal). - Wait until the new node status changes from
CreatingtoRunningfor Valkey or fromProvisioningtoRunningfor Redis OSS.- The new node is assigned the Replica role.
- Confirm that the cluster status returns to
Running.
Promote a node
If you need to change the Primary node of an active cluster, you can promote a Replica node to Primary.
- For Redis OSS, manual promotion is unavailable when automatic failover is enabled because the service performs promotion automatically.
- A single-node cluster has no Replica to promote. Add a Replica node before promotion.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster containing the node to promote.
- On the Node list tab, select the node and click [Promote].
- In the popup, confirm the node and click [Promote].
- Confirm that the cluster status changes to
Switchingfor Valkey orSwitchingOverfor Redis OSS during promotion. - Confirm that the cluster status returns to
Runningwhen promotion is complete. - Confirm that the promoted node role changed from Replica to Primary.
- Because a cluster can have only one Primary node, the former Primary becomes a Replica.
Delete a node
You can delete a node that is no longer needed. A Primary node can be deleted only in the Failed state. To delete a Primary node in another state, first change its role to Replica.
Deleted node resources are permanently released and cannot be recovered.
- Go to the KakaoCloud Console > Data Store > MemStore.
- In the Cluster menu, select the cluster containing the node to delete.
- On the Node list tab, select the node and click [Delete node].
- In the popup, enter Permanent deletion and click [Delete].
- During deletion, confirm that the cluster status changes to
Scaling(horizontal)and the node status changes toDeletingfor Valkey orTerminatingfor Redis OSS. - When deletion is complete, confirm that the cluster status returns to
Runningand the deleted node no longer appears.