Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara memulai failover manual untuk instance Memorystore for Redis tingkat standar. Fitur failover manual memungkinkan Anda menguji pengaruh failover normal terhadap aplikasi Anda.
Mode limited-data-loss meminimalkan kehilangan data dengan memverifikasi bahwa
perbedaan data antara instance utama dan replika berada di bawah 30 MB sebelum
memulai failover. Offset pada primary bertambah untuk setiap byte
data yang harus disinkronkan ke replikanya. Dalam mode limited-data-loss, failover akan dibatalkan jika delta offset terbesar antara primer
dan setiap replika adalah 30 MB atau lebih besar. Jika Anda dapat mentoleransi lebih banyak kehilangan data dan ingin
menjalankan failover secara agresif, coba tetapkan mode perlindungan data ke
force-data-loss.
Mode force-data-loss menggunakan rantai strategi failover untuk
mengeksekusi failover secara agresif. Fitur ini tidak memeriksa delta offset antara replika dan primer sebelum memulai failover; Anda berpotensi kehilangan perubahan data lebih dari 30 MB.
[[["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-19 UTC."],[],[],null,["# Initiate a manual failover\n\n| **Note:** You can only initiate a manual failover using the gcloud CLI tool.\n\nThis page describes how to initiate a **manual failover** for a standard tier Memorystore for Redis instance. The manual failover feature allows you to test how normal failovers affect your application.\n\nFor an overview of this feature, see [Manual failover](/memorystore/docs/redis/manual-failover-overview).\n\nInitiating a failover\n---------------------\n\n| **Warning:** Using the `--data-protection-mode=force-data-loss` mode may cause significant data loss. See [Manual failover](/memorystore/docs/redis/manual-failover-overview) to learn the appropriate scenarios for using the `force-data-loss` mode.\n\n1. Open a terminal window\n\n2. Use the `gcloud config` command to set your default project:\n\n\n ```\n gcloud config set core/project PROJECT_ID\n ```\n\n \u003cbr /\u003e\n\n3. Use the following command to initiate a failover:\n\n\n ```\n gcloud redis instances failover INSTANCE_NAME\n ```\n\n \u003cbr /\u003e\n\nOptional data protection mode\n-----------------------------\n\nThe two available data protection modes are:\n\n- `limited-data-loss` mode (default).\n- `force-data-loss` mode.\n\nTo set the data protection mode, use one of the following commands: \n\n gcloud redis instances failover INSTANCE_NAME --data-protection-mode=limited-data-loss\n\nor \n\n gcloud redis instances failover INSTANCE_NAME --data-protection-mode=force-data-loss\n\nHow data protection modes work\n------------------------------\n\nThe `limited-data-loss` mode minimizes data loss by verifying that the\ndifference in data between the primary and replica is below 30 MB before\ninitiating the failover. The offset on the primary is incremented for each byte\nof data that must be synchronized to its replicas. In the `limited-data-loss`\nmode, the failover will abort if the greatest offset delta between the primary\nand each replica is 30MB or greater. If you can tolerate more data loss and want\nto aggressively execute the failover, try setting the data protection mode to\n`force-data-loss`.\n\nThe `force-data-loss` mode employs a chain of failover strategies to\naggressively execute the failover. It does not check the offset delta between\nthe primary and replicas before initiating the failover; you can potentially\nlose more than 30MB of data changes.\n\nSee [Manual failover](/memorystore/docs/redis/manual-failover-overview)\nfor additional information."]]