Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan dua mode yang tersedia untuk Memorystore for Valkey: Mode Cluster Diaktifkan dan Mode Cluster Dinonaktifkan.
Mode Cluster Diaktifkan: Mode Cluster Diaktifkan mendukung spesifikasi cluster Valkey OSS. Dengan fitur ini, Anda dapat mempartisi data di beberapa shard dan berguna untuk aplikasi dengan volume atau kecepatan data yang tinggi.
Mode Cluster Dinonaktifkan: Saat Mode Cluster Dinonaktifkan, instance Anda tidak dipartisi dan dihosting di satu shard. Anda dapat menggunakan mode ini jika volume data dan throughput penulisan dapat ditangani oleh satu node dan Anda lebih memilih untuk menggunakan fitur tertentu yang tidak tersedia dalam Mode Cluster Diaktifkan.
Anda hanya dapat memilih antara Cluster Mode Enabled dan Disabled saat membuat instance. Kolom server_mode dalam output perintah INFO menentukan mode instance. Setelah membuat instance dengan Cluster Mode Enabled atau Cluster Mode Disabled, Anda tidak dapat mengubah instance ke mode lainnya. Sebaiknya pilih Cluster Mode Enabled karena mode ini memiliki karakteristik penskalaan horizontal yang lebih baik.
Membandingkan Mode Cluster Diaktifkan dan Mode Cluster Dinonaktifkan
Anda dapat memiliki maksimum dua replika baca untuk instance.
Mana yang harus saya pilih
Saat memilih antara Cluster Mode Enabled dan Cluster Mode Disabled, pertimbangkan faktor-faktor berikut:
Throughput baca dan tulis: Jika throughput tulis Anda dipenuhi oleh satu node dan throughput baca Anda dipenuhi oleh maksimum dua replika, gunakan instance Cluster Mode Disabled. Jika persyaratan throughput baca dan tulis tinggi, gunakan instance yang Diaktifkan Mode Cluster karena jenis instance ini dapat menyebarkan beban di berbagai node.
Bermigrasi dari Memorystore for Redis: Jika Anda menggunakan instance Memorystore for Redis atau instance Redis yang dikelola sendiri, migrasi ke instance Cluster Mode Disabled memerlukan perubahan minimal dibandingkan dengan migrasi ke instance Cluster Mode Enabled. Untuk bermigrasi ke instance dengan Cluster Mode Enabled, Anda harus menggunakan klien yang kompatibel dengan cluster.
Kueri multi-kunci: Instance Mode Cluster Nonaktif mendukung operasi multi-kunci (misalnya: MGET, MSET, EVAL) di seluruh kunci dalam database. Untuk instance yang Mengaktifkan Mode Cluster, operasi multi-kunci dibatasi ke satu slot hash.
Namespace: Dengan Cluster Mode Disabled, Anda dapat menggunakan beberapa database untuk mengelompokkan berbagai jenis data menggunakan perintah SELECT. Fitur ini berguna jika Anda ingin menggunakan instance yang sama untuk mendukung beberapa aplikasi atau Anda mungkin perlu menulis berbagai jenis data yang tidak terkait. Beberapa database tidak didukung oleh Cluster Mode Enabled. Sebagai praktik terbaik, sebaiknya Anda menggunakan beberapa instance Valkey, bukan beberapa database, untuk memastikan Kualitas Layanan (QoS). Beberapa database di node yang sama hanya menyediakan isolasi logis.
[[["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-09-04 UTC."],[],[],null,["# Enable and disable cluster mode\n\nThis page explains the two available modes for Memorystore for Valkey: Cluster Mode Enabled and Cluster Mode Disabled.\n\n- **Cluster Mode Enabled:** Cluster Mode Enabled supports the OSS Valkey [cluster specification](https://valkey.io/topics/cluster-spec/). It lets you partition your data across multiple shards and is useful for applications with high volume or velocity of data.\n\n- **Cluster Mode Disabled:** While in Cluster Mode Disabled, your instance isn't partitioned and is hosted on a single shard. You can use this mode if the volume of data and write throughput can be handled by a single node and you prefer to use the [specific features](/memorystore/docs/valkey/cluster-mode-enabled-and-disabled#comparison) that aren't available in Cluster Mode Enabled.\n\nYou can only select between Cluster Mode Enabled and Disabled when you create an instance. The `server_mode` field in the output of the [INFO](https://valkey.io/commands/info/) command specifies the mode of the instance. After you create an instance with either Cluster Mode Enabled or Cluster Mode Disabled, you can't change the instance to the other mode. We recommend that you select Cluster Mode Enabled because this mode has better horizontal scaling characteristics.\n\nCompare Cluster Mode Enabled and Cluster Mode Disabled\n------------------------------------------------------\n\n| **Note:** Regardless of whether you specify Cluster Mode Enabled or Cluster Mode Disabled for your Memorystore for Valkey instance, the following conditions apply:\n\n- You can [increase or decrease the size of the instance](/memorystore/docs/valkey/about-scaling-instance-capacity) only when you create it.\n- You can have a maximum of two [read replicas](/memorystore/docs/valkey/ha-and-replicas#replicas) for the instance.\n\nWhich should I choose\n---------------------\n\nWhen choosing between Cluster Mode Enabled and Cluster Mode Disabled, consider the following factors:\n\n- **Read and write throughput:** If your write throughput is fulfilled by a single node and your read throughput is fulfilled by a maximum of two replicas, then use a Cluster Mode Disabled instance. If the read and write throughput requirements are high, then use a Cluster Mode Enabled instance because this type of instance can spread the load across different nodes.\n- **Migrate from Memorystore for Redis:** If you're using a [Memorystore for Redis instance](../redis/memorystore-for-redis-overview) or a self-managed Redis instance, migrating to a Cluster Mode Disabled instance requires minimal changes as compared to migrating to a Cluster Mode Enabled instance. To migrate to a Cluster Mode Enabled instance, you must use a [cluster aware client](/memorystore/docs/valkey/client-library-code-samples#client_lib_cluster).\n\n | **Note** : Memorystore for Valkey supports [IAM authentication](/memorystore/docs/valkey/about-iam-auth), which is a more-secure authentication mechanism than the plain-text authentication that Memorystore for Redis supports.\n- **Multi-key queries:** A Cluster Mode Disabled instance supports multi-key operations (for example: MGET, MSET, EVAL) across keys within the database. For a Cluster Mode Enabled instance, multi-key operations are limited to a single hash slot.\n\n- **Namespacing:** With Cluster Mode Disabled, you can use multiple databases to bucket different kinds of data by using the `SELECT` command. This feature is useful if you want to use the same instance to power multiple applications or you might need to write different types of unrelated data. Multiple databases aren't supported by Cluster Mode Enabled. As a best practice, we recommend that you use multiple Valkey instances instead of multiple databases to ensure Quality of Service (QoS). Multiple databases on the same node provide logical isolation only."]]