Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite werden die beiden verfügbaren Modi für Memorystore for Valkey erläutert: „Clustermodus aktiviert“ und „Clustermodus deaktiviert“.
Clustermodus aktiviert:Der Clustermodus unterstützt die OSS-Valkey-Clusterspezifikation. Damit können Sie Ihre Daten auf mehrere Shards aufteilen. Das ist nützlich für Anwendungen mit einem hohen Datenvolumen oder einer hohen Datengeschwindigkeit.
Clustermodus deaktiviert:Wenn der Clustermodus deaktiviert ist, wird Ihre Instanz nicht partitioniert und auf einem einzelnen Shard gehostet. Sie können diesen Modus verwenden, wenn das Datenvolumen und der Schreibdurchsatz von einem einzelnen Knoten verarbeitet werden können und Sie die spezifischen Funktionen nutzen möchten, die im Modus „Cluster Mode Enabled“ nicht verfügbar sind.
Sie können nur beim Erstellen einer Instanz zwischen „Clustermodus aktiviert“ und „Clustermodus deaktiviert“ auswählen. Das Feld server_mode in der Ausgabe des Befehls INFO gibt den Modus der Instanz an. Nachdem Sie eine Instanz mit aktiviertem oder deaktiviertem Clustermodus erstellt haben, können Sie den Modus nicht mehr ändern. Wir empfehlen, den Clustermodus zu aktivieren, da dieser Modus bessere horizontale Skalierungseigenschaften hat.
Vergleich von „Clustermodus aktiviert“ und „Clustermodus deaktiviert“
Sie können maximal zwei Lesereplikate für die Instanz haben.
Welche Option sollte ich auswählen?
Berücksichtigen Sie bei der Auswahl zwischen „Cluster Mode Enabled“ und „Cluster Mode Disabled“ die folgenden Faktoren:
Lese- und Schreibdurchsatz:Wenn Ihr Schreibdurchsatz von einem einzelnen Knoten und Ihr Lesedurchsatz von maximal zwei Replikaten erfüllt wird, verwenden Sie eine Instanz mit deaktiviertem Clustermodus. Wenn die Anforderungen an den Lese- und Schreibdurchsatz hoch sind, verwenden Sie eine Instanz mit aktiviertem Clustermodus, da bei diesem Instanztyp die Last auf verschiedene Knoten verteilt werden kann.
Von Memorystore for Redis migrieren:Wenn Sie eine Memorystore for Redis-Instanz oder eine selbstverwaltete Redis-Instanz verwenden, sind für die Migration zu einer Instanz mit deaktiviertem Clustermodus im Vergleich zur Migration zu einer Instanz mit aktiviertem Clustermodus nur minimale Änderungen erforderlich. Wenn Sie zu einer Instanz mit aktiviertem Clustermodus migrieren möchten, müssen Sie einen clusterfähigen Client verwenden.
Anfragen mit mehreren Schlüsseln: Eine Instanz, in der der Clustermodus deaktiviert ist, unterstützt Vorgänge mit mehreren Schlüsseln (z. B. MGET, MSET, EVAL) für Schlüssel in der Datenbank. Bei einer Instanz mit aktiviertem Clustermodus sind Vorgänge mit mehreren Schlüsseln auf einen einzelnen Hash-Slot beschränkt.
Namespacing:Wenn der Clustermodus deaktiviert ist, können Sie mit dem Befehl SELECT mehrere Datenbanken verwenden, um verschiedene Arten von Daten zu gruppieren. Diese Funktion ist nützlich, wenn Sie dieselbe Instanz für mehrere Anwendungen verwenden möchten oder verschiedene Arten von nicht zusammenhängenden Daten schreiben müssen. Mehrere Datenbanken werden im Clustermodus nicht unterstützt. Als Best Practice empfehlen wir, mehrere Valkey-Instanzen anstelle von mehreren Datenbanken zu verwenden, um die Dienstqualität (Quality of Service, QoS) zu gewährleisten. Mehrere Datenbanken auf demselben Knoten bieten nur eine logische Isolation.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-19 (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."]]