Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengelola failover
Jika cluster Bigtable menjadi tidak responsif, replikasi memungkinkan traffic
masuk mengalami kegagalan ke cluster lain dalam instance yang sama. Failover dapat bersifat manual atau
otomatis, bergantung pada profil aplikasi yang digunakan aplikasi dan cara konfigurasi profil aplikasi.
Halaman ini menjelaskan langkah-langkah untuk melakukan failover antar-cluster.
Jika profil aplikasi merutekan semua permintaan ke satu cluster, Anda dapat melakukan
failover manual.
Jika profil aplikasi menggunakan perutean multi-cluster, failover akan
otomatis dan Anda tidak perlu melakukan tindakan apa pun.
Gunakan failover manual jika profil aplikasi merutekan semua permintaan ke satu cluster
dan cluster tersebut menjadi tidak responsif. Untuk contoh kriteria yang dapat Anda
gunakan untuk menentukan bahwa cluster tidak responsif, lihat
Failover manual. Periksa latensi replikasi instance Anda
sebelum Anda memutuskan untuk melakukan failover. Untuk informasi selengkapnya, lihat Diagram untuk replika.
Untuk melakukan failover manual, update profil aplikasi Anda agar merutekan permintaan
ke cluster yang responsif, bukan cluster yang tidak responsif:
Konsol
Buka daftar instance Bigtable di Google Cloud konsol.
Di kolom Application profiles, klik profil aplikasi yang merutekan traffic ke cluster yang tidak responsif.
Jika tidak melihat profil aplikasi yang ingin diedit, Anda dapat melihat
daftar lengkap dengan mengklik nama instance, lalu mengklik
Profil aplikasi di panel kiri.
Di bagian Cluster routing, pilih cluster responsif di instance Anda.
Klik Simpan. Dialog konfirmasi akan muncul.
Tinjau peringatan dalam dialog konfirmasi dengan cermat, lalu ikuti petunjuk dalam dialog dan klik Lanjutkan.
Jika Anda menerima pesan error, tinjau dengan cermat peringatan apa pun dalam
pesan error. Jika Anda ingin mengganti error, jalankan kembali perintah tersebut
dengan flag --force.
Segera setelah Anda mengupdate profil aplikasi, setiap aplikasi yang menggunakan profil aplikasi akan mulai mengarahkan semua permintaannya ke cluster yang sehat yang Anda pilih. Cluster yang tidak sehat akan terus menggunakan CPU untuk menangani replika dan tugas pemeliharaan lainnya.
Setelah cluster yang tidak sehat pulih, Anda dapat mengikuti langkah-langkah yang sama untuk mengupdate
profil aplikasi sehingga merutekan semua permintaan ke cluster yang dipulihkan.
Melakukan failover otomatis
Dengan Bigtable, failover otomatis benar-benar otomatis. Jika profil aplikasi menggunakan perutean multi-cluster, dan cluster terdekat ke server aplikasi menjadi tidak sehat, Anda tidak perlu melakukan tindakan apa pun.
Bigtable akan otomatis melakukan failover, meskipun cluster hanya
tidak responsif dalam waktu singkat, dan menggunakan cluster yang sehat terdekat untuk menangani permintaan hingga
cluster yang tidak responsif telah pulih.
Untuk melihat jumlah permintaan yang secara otomatis dialihkan selama periode waktu tertentu, lihat grafik Automatic Failovers di konsolGoogle Cloud : buka list of instances, klik nama instance, lalu klik Monitoring.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-27 UTC."],[[["\u003cp\u003eBigtable replication enables traffic failover to another cluster if one becomes unresponsive, either manually or automatically.\u003c/p\u003e\n"],["\u003cp\u003eManual failovers are required when an app profile routes all requests to a single cluster, and involve updating the app profile to direct traffic to a responsive cluster.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic failovers occur when an app profile uses multi-cluster routing, where Bigtable automatically reroutes traffic to the nearest healthy cluster.\u003c/p\u003e\n"],["\u003cp\u003eTo perform a manual failover, one must use the Google Cloud console or the gcloud command-line tool to update the app profile and select a healthy cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe number of requests automatically rerouted can be monitored using the "Automatic Failovers" graph in the Google Cloud console under instance monitoring.\u003c/p\u003e\n"]]],[],null,["# Manage failovers\n================\n\n\nIf a Bigtable cluster becomes unresponsive, replication makes it possible for incoming\ntraffic to fail over to another cluster in the same instance. Failovers can be either manual or\nautomatic, depending on the [app profile](/bigtable/docs/app-profiles) an application\nis using and how the app profile is configured.\n\nThis page describes the steps for performing a failover between clusters.\n\n- If an app profile routes all requests to a single cluster, you can [perform a\n manual failover](#manual).\n- If an app profile uses multi-cluster routing, [failovers are\n automatic](#automatic) and you don't need to take any action.\n\n\nBefore you read this page, you should be familiar with the\n[overview of Bigtable replication](/bigtable/docs/replication-overview).\nYou should also be familiar with the\n[routing options](/bigtable/docs/routing) that are available for\nBigtable.\n\nPerform a manual failover\n-------------------------\n\nUse a manual failover if an app profile routes all requests to a single cluster\nand that cluster becomes unresponsive. For examples of the criteria you could\nuse to determine that a cluster is unresponsive, see\n[Manual failovers](/bigtable/docs/failovers#manual). Check your instance's replication latency\nbefore you decide to fail over. For more information, see [Charts for\nreplication](/bigtable/docs/monitoring-instance).\n\nTo perform a manual failover, update your app profile so that it routes requests\nto a responsive cluster instead of the unresponsive cluster: \n\n### Console\n\n1.\n Open the list of Bigtable instances in the Google Cloud console.\n\n\n [Open the instance list](https://console.cloud.google.com/bigtable/instances)\n2. In the **Application profiles** column, click the app profile that is\n routing traffic to the unresponsive cluster.\n\n If you don't see the app profile you want to edit, you can view a\n complete list by clicking the name of the instance, then clicking\n **Application profiles** in the left pane.\n3. Under **Cluster routing**, select a responsive cluster in your instance.\n\n | **Important:** If **Any cluster (multi-cluster)** is selected, the app profile handles failovers automatically. Click **Cancel** to exit without saving.\n4. Click **Save**. A confirmation dialog appears.\n\n5. Carefully review the warnings in the confirmation dialog, then follow\n the instructions in the dialog and click **Continue**.\n\n### gcloud\n\n1.\n If you don't know the instance ID, use the\n [`bigtable instances\n list` command](/sdk/gcloud/reference/bigtable/instances/list) to view a list of your project's instances:\n\n gcloud bigtable instances list\n\n2.\n If you don't know the instance's cluster IDs, use the\n [`bigtable clusters list`\n command](/sdk/gcloud/reference/bigtable/clusters/list) to view a list of clusters in the instance:\n\n gcloud bigtable clusters list --instances=\u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e\n\n\n Replace \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e with the permanent identifier for the instance.\n3.\n If you don't know the app profile's ID, use the\n [`bigtable app-profiles\n list` command](/sdk/gcloud/reference/bigtable/app-profiles/list) to view a list of the instance's app profiles:\n\n gcloud bigtable app-profiles list --instance=\u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e\n\n\n Replace \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e with the permanent identifier for the instance.\n4. Use the [`bigtable app-profiles update` command](/sdk/gcloud/reference/bigtable/app-profiles/update) to\n change the cluster that the app profile uses:\n\n gcloud bigtable app-profiles update APP_PROFILE_ID \\\n --instance=INSTANCE_ID \\\n --route-to=CLUSTER_ID\n\n\n Provide the following:\n - `APP_PROFILE_ID`: The permanent identifier for the app profile.\n - `INSTANCE_ID`: The permanent identifier for the instance.\n - `CLUSTER_ID`: The cluster ID that all requests should be routed to. This flag enables [single-cluster routing](/bigtable/docs/routing#single-cluster).\n\n If you receive an error message, carefully review any warnings in the\n error message. If you want to override the error, run the command again\n with the `--force` flag.\n\nShortly after you update the app profile, any applications that use the app\nprofile will start to direct all of their requests to the healthy cluster that\nyou selected. The unhealthy cluster will continue using CPU to handle\nreplication and other maintenance tasks.\n\nAfter the unhealthy cluster recovers, you can follow the same steps to update\nyour app profile so that it routes all requests to the recovered cluster.\n\nPerform an automatic failover\n-----------------------------\n\nWith Bigtable, automatic failovers truly are automatic. If an app\nprofile uses multi-cluster routing, and the nearest cluster to the application\nserver becomes unhealthy, you don't need to take any action.\nBigtable automatically fails over, even if the cluster is only\nbriefly unhealthy, and uses the nearest healthy cluster to handle requests until\nthe unhealthy cluster has recovered.\n\nTo view the number of requests that were automatically rerouted over a given\nperiod of time, look at the **Automatic Failovers** graph in the\nGoogle Cloud console: open the [list of instances](https://console.cloud.google.com/bigtable/instances), click\nthe instance name, then click **Monitoring**.\n\nWhat's next\n-----------\n\nLearn how to [monitor a Bigtable instance](/bigtable/docs/monitoring-instance)."]]