After you create a Cloud Bigtable instance, you can update any of the following settings without any downtime:
The number of nodes in each cluster
After you add or remove nodes, it typically takes a few minutes under load for Cloud Bigtable to optimize the cluster's performance.
The number of clusters in the instance
After you add a cluster, it takes time for Cloud Bigtable to replicate your data to the new cluster. New clusters are replicated from the geographically nearest cluster in the instance. In general, the greater the distance, the longer replication will take.
The application profiles for the instance, which contain replication settings
The labels for the instance, which provide metadata about the instance
The display name for the instance
Before you begin
If you want to use the command-line tools for Cloud Bigtable,
install the Cloud SDK and the
cbt
command-line tool if you haven't already.
Adding and removing nodes
Nodes are the compute resources that a Cloud Bigtable cluster uses to access your data and perform administrative tasks. You should monitor each cluster's CPU and disk usage to make sure the cluster has enough nodes. To learn more about how the number of nodes affects a cluster's performance, see Performance for typical workloads.
By default, you can provision up to 30 Cloud Bigtable nodes per zone in each Google Cloud project. If you need to provision more nodes than the default limit, use the node request form.
To change the number of nodes in a cluster:
Console
Open the list of Cloud Bigtable instances in the Cloud Console.
Click the instance you want to change, then click Edit instance.
Under Configure clusters, click the pencil (edit) icon next to the cluster you want to update.
Under Nodes, enter the number of nodes for the cluster.
In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
Click Save.
gcloud
If you don't know the instance ID, use the
bigtable instances list
command to view a list of your project's instances:gcloud bigtable instances list
If you don't know the instance's cluster IDs, use the
bigtable clusters list
command to view a list of clusters in the instance:gcloud bigtable clusters list --instances=INSTANCE_ID
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
bigtable clusters update
command to change the number of nodes:gcloud bigtable clusters update CLUSTER_ID \ --instance=INSTANCE_ID \ --num-nodes=NUM_NODES
Provide the following values:
CLUSTER_ID
: The permanent identifier for the cluster.INSTANCE_ID
: The permanent identifier for the instance.NUM_NODES
: The number of nodes in the cluster. Each cluster in an instance must have 1 or more nodes.In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
cbt
If you don't know the instance ID, use the
listinstances
command to view a list of your project's instances:cbt listinstances
If you don't know the instance's cluster IDs, use the
listclusters
command to view a list of clusters in the instance:cbt -instance=INSTANCE_ID listclusters
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
updatecluster
command to change the number of nodes:cbt -instance=INSTANCE_ID updatecluster CLUSTER_ID NUM_NODES
Provide the following values:
INSTANCE_ID
: The permanent identifier for the instance.CLUSTER_ID
: The permanent identifier for the cluster.NUM_NODES
: The number of nodes in the cluster. Each cluster in an instance must have 1 or more nodes.In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
Adding and deleting clusters
An instance can have up to 4 clusters. Instances with 2 or more clusters automatically use replication.
Adding a cluster
You can add clusters to an existing instance, up to a maximum of 4 clusters per instance. Clusters can be in any region where Cloud Bigtable is available, as long as each cluster is in a different zone. The ideal locations for additional clusters depend on your use case. Before you add clusters to a single-cluster instance, read about the restrictions that apply when you change garbage-collection policies on replicated tables. Then see examples of replication settings for recommendations.
To add a cluster to an instance:
Console
Open the list of Cloud Bigtable instances in the Cloud Console.
Click the instance you want to change, then click Edit instance.
Under Configure clusters, click Add cluster.
If this button is disabled, the instance already has the maximum number of clusters.
Enter a cluster ID, and select the cluster's region and zone.
Enter the number of nodes for the cluster.
In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
Click Update.
Repeat these steps for each additional cluster, then click Save. Cloud Bigtable creates the cluster and starts replicating your data to the new cluster. You may see CPU utilization increase as replication begins.
Next, review the replication settings in the default app profile to see if they make sense for your replication use case. You might need to update the default app profile or create custom app profiles.
gcloud
If you don't know the instance ID, use the
bigtable instances list
command to view a list of your project's instances:gcloud bigtable instances list
If you don't know the instance's cluster IDs, use the
bigtable clusters list
command to view a list of clusters in the instance:gcloud bigtable clusters list --instances=INSTANCE_ID
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
bigtable clusters create
command to add a cluster:gcloud bigtable clusters create CLUSTER_ID \ --async \ --instance=INSTANCE_ID \ --zone=ZONE \ [--num-nodes=NUM_NODES] \ [--storage-type=STORAGE_TYPE]
Provide the following values:
CLUSTER_ID
: The permanent identifier for the cluster.INSTANCE_ID
: The permanent identifier for the instance.ZONE
: The zone where the cluster runs.An instance's clusters must each be in unique zones. You can create an additional cluster in any zone where Cloud Bigtable is available. For example, if the first cluster is in
us-east1-b
, you can choose a different zone in the same region, such asus-east1-c
, or a zone in a separate region, such aseurope-west2-a
. View the zone list.
The
--async
flag is not required but is strongly recommended. Without this flag, the command might time out before the operation is complete. Cloud Bigtable will continue to create the cluster in the background.The command accepts the following optional flags:
--num-nodes=NUM_NODES
: The number of nodes in the cluster. Each cluster in an instance must have 1 or more nodes. The default value is1
.In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
--storage-type=STORAGE_TYPE
: The type of storage to use for the cluster. Each cluster in an instance must use the same storage type. Accepts the valuesSSD
andHDD
. The default value isSSD
.
Next, review the replication settings in the default app profile to see if they make sense for your replication use case. You might need to update the default app profile or create custom app profiles.
cbt
If you don't know the instance ID, use the
listinstances
command to view a list of your project's instances:cbt listinstances
If you don't know the instance's cluster IDs, use the
listclusters
command to view a list of clusters in the instance:cbt -instance=INSTANCE_ID listclusters
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
createcluster
command to add a cluster:cbt -instance=INSTANCE_ID createcluster CLUSTER_ID ZONE NUM_NODES STORAGE_TYPE
Provide the following values:
INSTANCE_ID
: The permanent identifier for the instance.CLUSTER_ID
: The permanent identifier for the cluster.ZONE
: The zone where the cluster runs.An instance's clusters must each be in unique zones. You can create an additional cluster in any zone where Cloud Bigtable is available. For example, if the first cluster is in
us-east1-b
, you can choose a different zone in the same region, such asus-east1-c
, or a zone in a separate region, such aseurope-west2-a
. View the zone list.NUM_NODES
: The number of nodes in the cluster. Each cluster in an instance must have 1 or more nodes.In many cases, each cluster in an instance should have the same number of nodes, but there are exceptions. Learn about nodes and replication.
STORAGE_TYPE
: The type of storage to use for the cluster. Each cluster in an instance must use the same storage type. Accepts the valuesSSD
andHDD
.
Next, review the replication settings in the default app profile to see if they make sense for your replication use case. You might need to update the default app profile or create custom app profiles.
Deleting a cluster
If an instance has multiple clusters, you can delete all but 1 of the clusters. Deleting all but 1 cluster automatically disables replication.
In some cases, Cloud Bigtable does not allow you to delete a cluster:
- If one of your application profiles routes all traffic to a single cluster, Cloud Bigtable will not allow you to delete that cluster. You must edit or delete the application profile before you can remove the cluster.
- If you add new clusters to an existing instance, you cannot delete clusters in that instance until the initial data copy to the new clusters is complete.
To delete a cluster from an instance:
Console
Open the list of Cloud Bigtable instances in the Cloud Console.
Click the instance you want to change, then click Edit instance.
Under Configure clusters, click the trash can (delete) icon next to the cluster you want to delete.
To cancel the delete operation, click Undo, which is available until you click Save. Otherwise, click Save.
gcloud
If you don't know the instance ID, use the
bigtable instances list
command to view a list of your project's instances:gcloud bigtable instances list
If you don't know the instance's cluster IDs, use the
bigtable clusters list
command to view a list of clusters in the instance:gcloud bigtable clusters list --instances=INSTANCE_ID
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
bigtable clusters delete
command to delete the cluster:gcloud bigtable clusters delete CLUSTER_ID \ --instance=INSTANCE_ID
Provide the following values:
CLUSTER_ID
: The permanent identifier for the cluster.INSTANCE_ID
: The permanent identifier for the instance.
cbt
If you don't know the instance ID, use the
listinstances
command to view a list of your project's instances:cbt listinstances
If you don't know the instance's cluster IDs, use the
listclusters
command to view a list of clusters in the instance:cbt -instance=INSTANCE_ID listclusters
Replace
INSTANCE_ID
with the permanent identifier for the instance.Use the
deletecluster
command to delete the cluster:cbt -instance=INSTANCE_ID deletecluster CLUSTER_ID
Provide the following values:
INSTANCE_ID
: The permanent identifier for the instance.CLUSTER_ID
: The permanent identifier for the cluster.
Managing application profiles
Application profiles, or app profiles, control how your applications connect to an instance that uses replication. Every instance with more than 1 cluster has its own default app profile. You can also create many different custom app profiles for each instance, using a different app profile for each kind of application that you run.
To learn how to set up an instance's app profiles, see Configuring App Profiles. For examples of settings you can use to implement common use cases, see Examples of Replication Settings.
Managing labels
Labels are key-value pairs that you can use to group related instances and store metadata about an instance.
To learn how to manage labels, see Adding or updating an instance's labels and Removing a label from an instance.
Changing an instance's display name
To change an instance's display name, which the Cloud Console uses to identify the instance:
Console
Open the list of Cloud Bigtable instances in the Cloud Console.
Click the instance you want to change, then click Edit instance.
Edit the instance name, then click Save.
gcloud
If you don't know the instance ID, use the
bigtable instances list
command to view a list of your project's instances:gcloud bigtable instances list
Use the
bigtable instances update
command to update the display name:gcloud bigtable instances update INSTANCE_ID \ --display-name=DISPLAY_NAME
Provide the following values:
INSTANCE_ID
: The permanent identifier for the instance.DISPLAY_NAME
: A human-readable name that identifies the instance in the Cloud Console.
cbt
This feature is not available in the cbt
tool.
Upgrading a development instance
If you no longer want to use a development instance for development and testing, you can upgrade it to a production instance at any time. Upgrading a development instance is permanent.
To permanently upgrade a development instance to a production instance:
Console
Open the list of Cloud Bigtable instances in the Cloud Console.
Click the name of the instance you want to upgrade.
On the Instance details page, find the text that says Type: Development, then click the Upgrade link next to the text.
In the dialog box, click Upgrade.
Close the confirmation dialog box.
gcloud
Use the bigtable instances upgrade
command:
gcloud bigtable instances upgrade INSTANCE_ID
Replace INSTANCE_ID
with the permanent identifier for the instance.
The upgraded instance has a single cluster with 1 nodes. After you upgrade the instance, you can add a cluster or add nodes to the existing cluster.
cbt
This feature is not available in the cbt
tool.
What's next
- Learn how to add, update, and remove labels for an instance.
- Find out how to create and update an instance's app profiles, which contain settings for replication.