arrow_back

Monitoring and Managing Bigtable Health and Performance

Sprawdź swoją wiedzę i podziel się nią ze społecznością.
done
Zyskaj dostęp do ponad 700 praktycznych modułów oraz odznak umiejętności i szkoleń

Monitoring and Managing Bigtable Health and Performance

Moduł 1 godz. universal_currency_alt 1 punkt show_chart Wprowadzające
info Ten moduł może zawierać narzędzia AI, które ułatwią Ci naukę.
Sprawdź swoją wiedzę i podziel się nią ze społecznością.
done
Zyskaj dostęp do ponad 700 praktycznych modułów oraz odznak umiejętności i szkoleń

GSP1056

Google Cloud self-paced labs logo

Overview

Bigtable is Google's fully managed, scalable NoSQL database service. Bigtable is ideal for storing large amounts of data in a key-value store and for use cases such as personalization, ad tech, financial tech, digital media, and Internet of Things (IoT). Bigtable supports high read and write throughput at low latency for fast access to large amounts of data for processing and analytics.

Bigtable provides many options for monitoring and managing the health and performance of your instance, including charts for storage (disk) and compute (CPU) utilization, flexible options for autoscaling of nodes, replication to improve the durability and availability of your data, and backup and restoration of tables.

In this lab, you access various charts to monitor disk usage in a Bigtable instance, update an existing cluster to use node autoscaling, implement replication in an instance, and back up and restore data in Bigtable.

What you'll do

In this lab, you learn how to monitor and manage the health and performance of a Bigtable instance.

  • Monitor disk and CPU usage for a Bigtable instance.
  • Configure node autoscaling and replication in Bigtable.
  • Back up and restore data in Bigtable.

Prerequisites

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.

This hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab---remember, once you start, you cannot pause a lab.
Note: If you already have your own personal Google Cloud account or project, do not use it for this lab to avoid extra charges to your account.

How to start your lab and sign in to the Google Cloud console

  1. Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:

    • The Open Google Cloud console button
    • Time remaining
    • The temporary credentials that you must use for this lab
    • Other information, if needed, to step through this lab
  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab Details panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab Details panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To view a menu with a list of Google Cloud products and services, click the Navigation menu at the top-left. Navigation menu icon

Activate Cloud Shell

Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.

  1. Click Activate Cloud Shell Activate Cloud Shell icon at the top of the Google Cloud console.

When you are connected, you are already authenticated, and the project is set to your Project_ID, . The output contains a line that declares the Project_ID for this session:

Your Cloud Platform project in this session is set to {{{project_0.project_id | "PROJECT_ID"}}}

gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.

  1. (Optional) You can list the active account name with this command:
gcloud auth list
  1. Click Authorize.

Output:

ACTIVE: * ACCOUNT: {{{user_0.username | "ACCOUNT"}}} To set the active account, run: $ gcloud config set account `ACCOUNT`
  1. (Optional) You can list the project ID with this command:
gcloud config list project

Output:

[core] project = {{{project_0.project_id | "PROJECT_ID"}}} Note: For full documentation of gcloud, in Google Cloud, refer to the gcloud CLI overview guide.

Task 1. Monitor disk usage

To ensure the performance of your Bigtable instance, it is important to monitor the disk and CPU usage for each cluster in your instance.

In this task, you use the Monitoring tab in Bigtable to review disk utilization for a cluster to ensure that the values are under the recommended thresholds.

Monitor disk utilization

In Bigtable, the storage capacity of each cluster is determined by the storage type (SSD or HDD) and the number of nodes. As the amount of data in a cluster increases, Bigtable redistributes the data across the nodes in the cluster.

In general, we recommend that you utilize less than 70% of disk storage in a cluster. For latency-sensitive applications, we recommend that storage utilization per node remain below 60%. As your data grows, you can add more nodes to maintain low latency.

  1. In the Google Cloud Console, in the Navigation menu (Navigation menu), under Databases, click Bigtable.

  2. Click on the instance ID named sandiego.

  3. In the navigation menu for Bigtable, under Insights, click Monitoring.

  4. For Group by, select Cluster.

    Review the charts with names beginning with the prefix Storage.

    You can calculate the storage usage per node by dividing the storage utilization in bytes by the number of nodes in the cluster.

Task 2. Configure node autoscaling

After reviewing the disk and CPU utilization of your clusters, you may need to increase the number of nodes to satisfy the recommended levels for compute and storage. Bigtable provides options for either manual allocation or autoscaling of node count in a cluster.

When autoscaling is enabled for a cluster, Bigtable adjusts the number of nodes to meet the targets for CPU and storage utilization. In this task, you enable autoscaling of nodes in an existing cluster in your Bigtable instance.

  1. In the navigation menu for Bigtable, under Instance, click Overview.

  2. From the list of cluster IDs, click on the cluster ID named sandiego-traffic-sensors-c1.

    Review the details provided in the Overview section. The node scaling mode is currently set to Manually scale nodes.

  3. To apply node autoscaling to the cluster, run the following command:

gcloud bigtable clusters update sandiego-traffic-sensors-c1 \ --instance=sandiego \ --autoscaling-min-nodes=1 \ --autoscaling-max-nodes=3 \ --autoscaling-cpu-target=60
  1. Refresh the page, and click Show details for Autoscale nodes.

    Autoscaling has been applied to the cluster, starting with one node autoscaling up to three nodes. The CPU utilization target is set to the recommended value of 60%.

Click Check my progress to verify the objective. Configure node autoscaling.

Task 3. Configure replication

If an instance has only one cluster, the durability and availability of your data are limited to the zone where that cluster is located. Replication can improve both durability and availability by storing separate copies of your data in multiple zones or regions and automatically failing over between clusters if needed.

In this task, you configure replication in your Bigtable instance by adding a new cluster with autoscaling enabled to ensure the adequate provisioning of resources for the new cluster.

  1. To return to the Overview page for the instance, click instance sandiego.

  2. Click Edit instance.

  3. Click Add cluster.

  4. Enter the required information to create a new cluster:

Property Value
Cluster ID sandiego-traffic-sensors-c2
Region
Zone Select any available zone.
Node scaling mode Autoscaling
Minimum 1
Maximum 3
CPU utilization target 60

  1. Click Add.

  2. Click Save.

In the list of cluster IDs, there are now two clusters:

  • sandiego-traffic-sensors-c1
  • sandiego-traffic-sensors-c2

Click Check my progress to verify the objective. Configure replication.

Task 4. Back up and restore data in Bigtable

In Bigtable, you can back up the schema and data of a table, and then restore the backup to a new table as needed. While replication is intended to enable failover to different regions or zones, backups are intended to help recover data from application-level data corruption or operational errors such as accidental table deletions.

In this task, you create a backup of the table named current_conditions, and then restore the backup to a new table in your instance.

Create a backup

  1. In the navigation menu for Bigtable, under Instance, click Tables.

  2. From the list of table IDs, in the line for current_conditions, click the Table action (More icon) menu, and then click Create backup.

    The Table ID is prepopulated as current_conditions, and it will be the first available backup for the table.

  3. For Cluster ID, select sandiego-traffic-sensors-c1.

    The cluster ID identifies the cluster from which the table is backed up and the cluster where the backup is stored.

  4. For Backup ID, type current_conditions_30.

  5. For Set an expiration date, select 30 days.

    The expiration date is automatically updated to 30 days from the present time.

  6. Click Create.

Restore backup

In Bigtable, backups are not readable. To access the data in a backup, you can use the option for Restore on the Backups tab for Bigtable.

  1. From the list of backup IDs, in the line for current_conditions_30, click Restore.

  2. For Table ID, type current_conditions_30_restored.

  3. Click Restore.

  4. To remove the filter for table ID, click on the x next to Table: current_conditions_30_restored.

    In the list of table IDs, there are now two tables:

    • current_conditions
    • current_conditions_30_restored

Click Check my progress to verify the objective. Create the backup and restore it.

Delete backup

You can also easily delete a backup when it is no longer needed.

  1. In the navigation menu for Bigtable, under Instance, click Backups.

  2. From the list of backup IDs, in the line for current_conditions_30, click on the three vertical dots, and select Delete.

  3. In the confirmation dialog, type current_conditions_30

  4. Click Delete.

Congratulations!

You have now completed key tasks to monitor and manage the health and performance of your Bigtable instance, including reviewing disk utilization, enabling node autoscaling and replication, and backing up and restoring data.

Next steps / Learn more

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated May 30, 2024

Lab Last Tested May 29, 2024

Copyright 2024 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Ta treść jest obecnie niedostępna

Kiedy dostępność się zmieni, wyślemy Ci e-maila z powiadomieniem

Świetnie

Kiedy dostępność się zmieni, skontaktujemy się z Tobą e-mailem