Memorystore for Valkey is a fully managed Valkey service for Google Cloud which supports both Cluster Mode Enabled and Cluster Mode Disabled instances. Applications
running on Google Cloud can achieve extreme performance by leveraging the highly
scalable, available, secure Valkey service without the burden of managing complex
Valkey deployments.

## Key concepts and terms

### Cluster Mode Enabled and Cluster Mode Disabled instances

Memorystore for Valkey instance can be created in both Cluster Mode Enabled and Cluster Mode Disabled modes. While a Cluster Mode Enabled instance can have one or more shards, a Cluster Mode Disabled instance runs on a single shard. For more details see [Enable and disable Cluster Mode](https://docs.cloud.google.com/memorystore/docs/valkey/cluster-mode-enabled-and-disabled.md.txt).

### Hierarchical resource structure

Memorystore for Valkey gathers the various resources used in a Valkey deployment
into a hierarchical structure that simplifies administration and management.
Here is a diagram that illustrates this structure:

![A diagram that shows that a
Memorystore instance contains a primary node and replica nodes](https://docs.cloud.google.com/static/memorystore/img/valkey-ha3.png)

Memorystore for Valkey instances are composed of a set of shards, each
containing a subset of your key space. Each shard in an instance
is composed of one primary node, and optionally up to five replica nodes.
When replica nodes are added, Memorystore automatically
distributes the nodes of a shard across zones to provide higher availability and
throughput.

### Instances

When provisioning a Memorystore for Valkey instance, you must provision enough
shards to serve the keyspace of your entire application. For details about
instance specification, see [Instance and node specification](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt).

### Shards

Your instance is composed of multiple equally sized shards. For details about shard specification, see [Instance and node specification](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt).

### Primary and replica nodes

There is one primary node per shard. Each shard can have 0-5 replica nodes.
Replicas provide high availability and additional read throughput, and are
distributed across zones evenly.

For more details see [High availability and replicas](https://docs.cloud.google.com/memorystore/docs/valkey/ha-and-replicas.md.txt).

### Valkey version

Memorystore for Valkey supports Valkey versions 7.2, 8.0, 9.0, and 9.1. For more
information about the features introduced by each version, see [Supported versions](https://docs.cloud.google.com/memorystore/docs/valkey/supported-versions.md.txt). Memorystore for Valkey supports a [subset of the total Valkey command library](https://docs.cloud.google.com/memorystore/docs/valkey/supported-commands.md.txt).

## Instance endpoints

- **Cluster Mode Enabled:** Each instance has a discovery endpoint to which your client connects. Your client also uses the discovery endpoint for node discovery. For more
  information, see [Instance endpoints for Cluster Mode Enabled](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#cluster_instance).

- **Cluster Mode Disabled:** Each instance has a primary endpoint and a reader endpoint. The primary endpoint always directs traffic to the primary node, while the reader endpoint load-balances read queries across available replicas automatically. For more information, see [Instance endpoints for Cluster Mode Disabled](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#cluster_mode_disabled_instance).

## Networking prerequisites

Before you can create a Memorystore for Valkey instance, you must set up
[Networking](https://docs.cloud.google.com/memorystore/docs/valkey/networking.md.txt) for your project.

## Billing

See the [Pricing](https://cloud.google.com/memorystore/valkey/pricing) page for
information on pricing for available regions.