Introduction
Cloud Bigtable is a sparsely filled table with billions of rows and thousands of columns that may contain terabytes or even petabytes of data. Each row has an indexed value; this value is known as the row key. Bigtable is suited for storing massive volumes of single-keyed data in a low-latency environment. It has a high read and write throughput with minimal latency, making it an excellent data source for MapReduce processes.
To utilize Cloud Bigtable, you must first establish instances that include clusters to which your apps may connect. Nodes are computing units that handle your data and conduct maintenance duties in each cluster.
We have already learned about creating instances in the previous article.
Let us now learn some advanced features in Cloud Bigtable.
Modify an instance
Before you Start
If you wish to utilize Bigtable's command-line tools, you must first install the Google Cloud CLI and the cbt CLI.
Configure autoscaling
Enable autoscaling
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Click Edit for the cluster you wish to update under Configure clusters.
- Choose Autoscaling.
-
Fill in the following values:
- Minimum number of nodes
- Maximum number of nodes
- CPU utilization target
- Storage utilization target
- Click the Save option.
Disable autoscaling
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Click Edit for the cluster you wish to update under Configure clusters.
- Select Manual node allocation.
-
In the Quantity field, enter the number of cluster nodes.
There are certain exceptions to the rule that each cluster in an instance should have the same number of nodes. Discover nodes and replication. - Click the Save option.
Change autoscaling settings
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Click Edit for the cluster you wish to update under Configure clusters.
-
Enter new values for any of the following fields that you want to modify.
- Minimum number of nodes
- Maximum number of nodes
- CPU utilization target
- Storage utilization target
- Click the Save option.
Add or remove nodes manually
When the node scaling mode of a cluster is manual, you can add or delete nodes, and the number of nodes remains constant until you alter it again.
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Click Edit for the cluster you wish to update under Configure clusters.
- Select Manual node allocation.
-
In the Quantity field, enter the number of cluster nodes.
There are certain exceptions to the rule that each cluster in an instance should have the same number of nodes. Discover nodes and replication. - Click the Save option.
Add a cluster
Clusters can be added to an existing instance. Clusters can be added to an instance in up to 8 regions where Bigtable is accessible. A zone in a region can only have one cluster. Your use case determines the best places for new clusters.
If your instance is CMEK-protected, each new cluster must use the same CMEK key as the cluster. Before adding a new cluster to a CMEK-protected instance, identify or establish a CMEK key in the area where the cluster will be located.
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Click Add cluster under Configure clusters. If this button is not enabled, the instance has reached its maximum number of clusters.
- Enter a cluster ID and choose a region and zone for the cluster.
- Enter the number of cluster nodes. There are exceptions to the rule that each cluster in an instance should have the same number of nodes. Discover nodes and replication.
- Select or input a customer-managed key if the instance is CMEK-protected. The cluster and the CMEK key must be in the same area.
- Select Add.
- Repeat for each subsequent cluster, then click Save. Bigtable establishes the cluster and begins replicating your data to it. As replication begins, CPU consumption may rise.
- Examine the replication parameters in the default app profile to see whether they are appropriate for your replication use case.
Delete a cluster
If an instance has many clusters, you can remove all except one of them. Replication is automatically off when all but one cluster are deleted.
Bigtable does not enable you to remove a cluster in the following cases:
- Bigtable will not enable you to remove a cluster if one of your application profiles routes all traffic to it. Before deactivating the cluster, you must first change or delete the application profile.
- If you add additional clusters to an existing instance, you won't be able to remove clusters until the first data copy to the new clusters is finished.
Below are the steps to delete a cluster:
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Under Configure clusters, choose the cluster to be deleted and click Delete cluster .
- Click Undo to cancel the delete action, which is accessible until you click Save. Otherwise, press the Save option.
Move data to a new location
To relocate data in a Bigtable instance to a new zone or region, create a new cluster in the desired place and then remove the cluster in the desired location. You don't have to worry about any queries failing since the deleted cluster stays available until the data has been replicated to the new cluster. Bigtable immediately replicates all data to the new cluster.
Manage app profiles
Application profiles, often known as app profiles, govern how your apps connect to a replication-enabled instance. Every instance that has several clusters has its default app profile. You may also construct various bespoke app profiles for each instance, with a separate app profile for each type of application you run.
Manage labels
Labels are key-value pairs that may be used to organize similar instances and store instance metadata.
Change an instance's display name
To modify an instance's display name, which is used by the console to identify the instance:
- In the terminal, navigate to the list of Bigtable instances.
- Choose the instance you wish to modify, then click Edit instance.
- Change the name of the instance, then click Save.