Memorystore in Google Cloud: The Complete Intermediate Guide

Memorystore in Google Cloud: The Complete Intermediate Guide

Learn how Google Cloud's managed in-memory service works, from keys and shards to failover, security, scaling, and real-world design patterns, explained step by step in plain English.

Imagine a busy restaurant kitchen. The chef could walk to the big warehouse across town every time someone orders pasta, but the dinner rush would be a disaster. So the chef keeps the most-used ingredients on a small shelf right next to the stove. Grabbing salt takes a second instead of an hour. Applications face the same problem every day. Their main database is the warehouse: large, reliable, but slow to reach. Memorystore is the shelf next to the stove.

This guide walks you through Memorystore in Google Cloud from the very first idea to production-grade design choices. You do not need any background in caching. Every new word is explained the first time it appears, with a simple comparison from everyday life. By the end, you will know which Memorystore engine to pick, how a request travels through it, how it survives failures, how to keep it secure, and which mistakes to avoid.

1What Memorystore Is and Why It Exists

Memorystore is Google Cloud’s fully managed service for keeping data in memory so applications can read it in a fraction of a millisecond.

The problem: databases are slow compared to memory

A traditional database stores data on disks, even when those disks are fast solid-state drives. Every read has to travel over a network, wait in a queue, be found on storage, and travel back. For a single request this is fine. For millions of requests per minute, the delay adds up and the database becomes the bottleneck. Users feel it as slow pages, spinning loaders, and timeouts.

Computer memory (RAM) is thousands of times faster than disk. If the application keeps its most popular data in RAM, it can answer many requests without ever touching the database. This idea is called caching, and a system built to hold data in memory is called an in-memory data store.

Simple Analogy

Think of your phone’s recent-contacts list. Scrolling through thousands of saved contacts every time you want to call your best friend would be tiresome, so the phone keeps the people you call most near the top. Memorystore does the same for an application: it keeps the most wanted data close and instantly reachable.

What “managed” really means

You could install an open-source in-memory server on your own virtual machine. Then you would be responsible for patching it, restarting it when it crashes, copying data to a backup machine, watching memory usage, and planning upgrades. “Managed” means Google takes over those chores. Memorystore handles provisioning, replication, automatic failover, patching, and monitoring integration, while you focus on how your application uses the data.

Memorystore is also built to speak the same language as popular open-source engines. Existing client libraries and tools usually work with little or no change, which makes moving a cache to Google Cloud far less painful than rewriting an application.

Sub-ms
typical data access time from memory
250
maximum nodes in Valkey and Redis Cluster instances
99.99%
top availability SLA on multi-zone HA cluster instances
i
Good to Know

Memorystore is not a replacement for your main database. It is a fast companion. The database remains the source of truth, and Memorystore holds copies or short-lived data that needs speed.

Where Memorystore fits among Google Cloud services

Google Cloud has many places to keep data, and beginners often wonder which one to use. Cloud SQL, AlloyDB, and Spanner are relational databases built for durable, structured records. Firestore and Bigtable are databases for flexible or very large datasets. Cloud Storage keeps files and objects. Memorystore is different from all of these because its main promise is speed rather than long-term storage. It usually sits in front of one of them, answering the repeated questions quickly so the heavier database can focus on the work only it can do.

This placement also explains how to think about failure. If a database fails, you may lose business records. If a cache fails, you lose speed for a while, but the records are still safe. Designing with that mindset keeps the system honest about what each part is responsible for.

2Core Concepts You Must Know First

A handful of simple ideas explain almost everything about in-memory data stores.

Before looking at Google Cloud specifics, let us build a shared vocabulary. These words appear in every Memorystore document, and once they click, the rest of the service feels natural.

Term 1

Key-Value Pair

The basic unit of storage. A key is a unique name, like a locker number, and the value is whatever sits inside that locker.

Term 2

Cache Hit and Miss

A hit means the data was found in memory. A miss means it was not, so the application must fetch it from the database.

Term 3

TTL (Time To Live)

A countdown attached to a key. When it reaches zero, the data disappears automatically, like milk with an expiry date.

Term 4

Eviction

When memory is full, the store removes some data to make room. The rule it follows is called the eviction policy.

Term 5

Shard

One slice of a big dataset. Splitting data into shards lets many machines share the work instead of one machine carrying everything.

Term 6

Replica

A live copy of a shard kept on another machine, ready to take over if the original fails.

Term 7

Persistence

Saving in-memory data to durable storage so it can be recovered after a restart, usually through snapshots or logs.

Term 8

Failover

The automatic switch from a failed machine to its replica so the application keeps working.

Keys, values, and data types

The engines behind Memorystore do more than store plain text. A value can be a simple string, a list, a set of unique items, a sorted set where every item has a score, or a hash that groups several fields together. These richer types are why in-memory stores are used for leaderboards, queues, and counters, not just caching web pages.

Simple Analogy

A cache hit is finding your keys in the bowl by the front door. A cache miss is searching the whole house, finding them in a coat pocket, and then putting them in the bowl so tomorrow is easier. Every miss teaches the cache something new.

Why memory limits matter

RAM is fast but expensive and limited. You cannot keep everything in it. Good use of Memorystore is mostly about deciding what deserves a place in memory, how long it should stay, and what happens when the space runs out. Those three decisions shape cost, speed, and reliability more than any other setting.

!
Common Misconception

Many beginners assume data in memory is safe forever. It is not. Memory is lost when a machine restarts unless persistence is turned on, and even then the design goal is speed rather than long-term safekeeping.

The data types in more detail

Choosing the right data type is one of the biggest skills in working with an in-memory store. A string is the simplest type and holds text, numbers, or small serialized objects. It is perfect for a cached page fragment or a single counter. A hash groups several named fields under one key, which is a tidy way to hold a user profile without creating a separate key for every detail. A list keeps items in order, so it suits recent-activity feeds or simple work queues. A set holds unique items with no order, which is handy for questions such as “has this visitor already been counted today?”. A sorted set keeps unique items ranked by a score, which is the engine behind leaderboards.

Each type has trade-offs. A hash with a few dozen fields is compact and quick. A list with millions of entries is slow to walk through and heavy on memory. Think about how the data will be read before deciding how it is stored, because in memory stores the shape of the data decides the speed of the question.

Simple Analogy

Data types are like containers in a kitchen. A jar (string) holds one thing. A spice rack with labeled slots (hash) holds many related things. A queue of plates (list) is served in order. A sorted shelf of trophies (sorted set) always shows the best on top. Using the wrong container makes the kitchen slow and messy.

3The Memorystore Family of Engines

Memorystore is not one product. It is a family of managed services, each built around a different open-source engine.

Google Cloud offers Memorystore for Valkey, Memorystore for Redis Cluster, Memorystore for Redis, and Memorystore for Memcached. They share a purpose, but they differ in how they scale, how available they are, and how long Google plans to recommend them. Choosing the right one at the start saves painful migrations later.

Valkey, in simple words

Valkey is an open-source in-memory data store that began as a community fork of Redis and is governed by the Linux Foundation. It speaks the same protocol as Redis, so most Redis clients work with it. Memorystore for Valkey is Google’s newest and most actively developed offering, and it is the one Google points many customers toward, including those moving away from Memcached.

Engine 1

Memorystore for Valkey

Cluster-based, horizontally scalable, supports both cluster mode enabled and disabled, vector search, backups, and cross-region replication.

Engine 2

Memorystore for Redis Cluster

A sharded Redis service with zero-downtime scaling and multi-zone high availability, built for large and busy workloads.

Engine 3

Memorystore for Redis

The original single-instance service with Basic and Standard tiers. Simple and good for smaller or older workloads.

Engine 4

Memorystore for Memcached

A simple multi-node cache with no data types beyond basic values. Now on a deprecation path, covered below.

FeatureValkeyRedis ClusterRedis (standalone)Memcached
Scaling styleHorizontal, by shardsHorizontal, by shardsVertical, one primaryAdd or remove nodes
High availabilityReplicas across zonesReplicas across zonesStandard tier replicaMulti-node, no data copies
Top SLAUp to 99.99%Up to 99.99%99.9% (Standard)99.9%
Rich data typesYesYesYesNo
Private connectivityPrivate Service ConnectPrivate Service ConnectPrivate Service Access or direct peeringPrivate Service Access or direct peering
Best forNew builds, large scale, AILarge Redis workloadsSmall, simple cachesExisting legacy caches
!
Memcached Deprecation Notice

Google’s documentation states that Memorystore for Memcached stopped being a recommended service on January 20, 2026, and that Cloud Customer Care for it ends on January 31, 2029. Google recommends migrating Memcached workloads to Memorystore for Valkey. Plan new projects accordingly.

Simple Analogy

Picking an engine is like picking a vehicle. Standalone Redis is a reliable family car: great for daily trips. Valkey and Redis Cluster are a fleet of delivery trucks that can grow with the business. Memcached is a trusty old bicycle that still works, but the shop has stopped selling spare parts for the long term.

One more point about versions. Memorystore for Redis is based on open-source Redis 7.2 and earlier, and it supports a subset of the full command library. Google’s release notes show Memorystore for Valkey adding newer Valkey versions over time. Always check the supported versions page in the documentation before you plan an upgrade.

Cluster mode enabled and cluster mode disabled

Google’s release notes describe that Memorystore for Valkey supports two configurations. In cluster mode enabled, data is split across shards using hash slots, which gives the best scaling. Clients must be cluster-aware. In cluster mode disabled, the instance behaves more like a classic single-primary setup, which is simpler for older applications that were never written to understand clusters. Neither is better in every case. The enabled mode is usually the right long-term choice for growth, while the disabled mode can ease a first migration.

i
Choosing the Mode

If your application uses commands that touch several keys at once, test them in cluster mode. Keys that live on different shards cannot always be used in one command, so key design may need small changes.

4Architecture and Components

An instance is made of shards, shards are made of nodes, and everything is reached through a private network endpoint.

The building blocks

When you create a clustered Memorystore instance, you are really creating a small team of machines that work together. The instance is the whole team. Each shard is a sub-team that owns a portion of the data. Inside a shard, one primary node accepts writes and one or more replica nodes hold copies. Together these pieces give you both capacity (more shards means more room) and safety (more replicas means more copies).

flowchart TD
  APP["Application on GKE, Compute Engine, or Cloud Run"] --> PSC["Private Service Connect endpoint"]
  PSC --> DISC["Discovery endpoint"]
  DISC --> S1["Shard 1"]
  DISC --> S2["Shard 2"]
  DISC --> S3["Shard 3"]
  S1 --> P1["Primary node"]
  S1 --> R1["Replica node"]
  S2 --> P2["Primary node"]
  S2 --> R2["Replica node"]
  S3 --> P3["Primary node"]
  S3 --> R3["Replica node"]
        
FIG 1 — Anatomy of a clustered Memorystore instance

Read the diagram from the top. The application sends a request to a private endpoint inside your own network. The discovery endpoint tells the client library which shard owns the data it wants. The client then talks to the correct primary node directly. Replicas sit beside each primary, silently copying every change.

The endpoints explained

Clustered Memorystore instances expose a discovery endpoint. Think of it as the reception desk of a large office building. You do not need to know which room each employee sits in. You ask reception, and you are told where to go. Google documents that this endpoint is backed by multiple nodes across multiple zones, so it keeps working even when some nodes are being replaced or updated.

Because node addresses can change during maintenance or scaling, your application should never hard-code them. Good client libraries for clusters learn the layout from the discovery endpoint and refresh it automatically.

Simple Analogy

A shard is like one aisle in a giant library. No single librarian could manage every book, so each aisle has its own librarian (the primary) and a backup librarian (the replica) who studies the same shelves. The front desk (the discovery endpoint) simply points visitors to the right aisle.

Node types and sizes

For Memorystore for Redis Cluster, Google documents several node types. The smallest, redis-shared-core-nano, is meant for small experiments: it has variable performance and no SLA, and its memory limit cannot be changed, so it is unsuitable for production. For production, the documentation recommends node types such as redis-standard-small, redis-highmem-medium, and redis-highmem-xlarge. More vCPUs help with heavy command processing, while more memory helps with big datasets. Memorystore for Valkey has its own list of node types, and Google’s release notes mention new Valkey node types becoming generally available in 2026.

i
Sizing Tip

If you need more throughput, add shards. If you need more memory per shard or more processing power per shard, move to a bigger node type. Both can be done while the instance keeps running, which is a major benefit of the clustered services.

Shapes, versions, and modules

Besides node types, an instance has a version and may offer extra features. Memorystore for Valkey lets you upgrade the engine version of an instance, and Google’s release notes show newer Valkey versions being added over time. Upgrading is valuable because new versions bring performance improvements and security fixes. Treat an upgrade like any other release: read the notes, test in staging, and then move production.

Some features arrive as extra modules. The release notes mention support for JSON documents and Bloom filters in preview for Memorystore for Valkey, and vector search that is generally available. A Bloom filter is a very small structure that answers the question “have I probably seen this before?” using little memory, which is useful for avoiding useless database lookups. Because preview features can change, avoid building critical systems on them until they are generally available.

Simple Analogy

A Bloom filter is like a nightclub bouncer with a quick glance at a guest list. He can say “definitely not on the list” immediately, and “probably on the list” for the rest. It is fast and tiny, though once in a while it is wrong in the cautious direction.

5How Memorystore Works Internally

Hash slots, replication, and health checks are the three mechanisms that make a cluster behave like one big store.

Hash slots: how data finds its shard

In a cluster, every key is run through a mathematical function that turns it into a number. That number places the key in one of 16,384 buckets called hash slots. Each shard owns a range of these slots. So when the application asks for a key, the client library calculates the slot and goes straight to the shard that owns it. No central server needs to decide, which is why clusters scale so well.

Simple Analogy

Picture a post office sorting letters by postal code. The code on the envelope decides the delivery route instantly. Hash slots are the postal codes of your data, and each shard is a delivery route covering a range of codes.

Replication: keeping copies in sync

Whenever the primary node changes a value, it streams that change to its replicas. The replicas apply the change in order, so they stay almost identical to the primary. This copying is usually asynchronous, meaning the primary does not wait for the replica before replying to your application. That keeps writes fast, but it also means a replica can be a tiny moment behind. If the primary fails at exactly the wrong instant, the very latest write may be lost. This is a normal trade-off of speed versus perfect safety.

Health checks and automatic failover

Memorystore constantly monitors the health of every node. If a primary stops responding, the service promotes one of its replicas to become the new primary and updates the cluster layout. Client libraries notice the change and reconnect to the new primary. For clustered instances, Google also spreads primaries and replicas across zones so that one data center problem does not take both copies down together.

sequenceDiagram
  participant App as Application
  participant P as Primary node
  participant R as Replica node
  participant M as Memorystore control
  App->>P: Write request
  P-->>App: Acknowledge
  P->>R: Stream the change
  Note over P: Primary stops responding
  M->>R: Promote to primary
  M-->>App: Updated topology
  App->>R: Next request now goes here
        
FIG 2 — Replication and automatic failover sequence

The sequence above shows why applications should expect brief hiccups during failover. The switch is quick, but not instant. Well-written clients retry a failed request after a short pause, and your users will usually never notice.

!
Common Mistake

Treating failover as impossible. Applications that never retry will show errors during a failover. Always configure sensible timeouts and retries in your client library.

What happens when memory fills up

Every node has a maximum amount of memory it may use. When a node reaches that limit and a new write arrives, the engine must decide what to do. The decision is controlled by the eviction policy. Some policies refuse new writes and return an error. Others remove the least recently used keys, the least frequently used keys, or keys that are closest to expiring. Some policies consider every key, while others only consider keys that have a TTL. The available choices and the default for each service are listed in the Memorystore documentation, so check them rather than assuming.

Picking a policy is a business decision as much as a technical one. A pure cache usually prefers to quietly drop the oldest or least useful entries, because losing a cache entry costs only a database lookup. A store that holds sessions or counters may prefer errors over silent loss, because disappearing sessions log users out. Match the policy to what the data means.

Simple Analogy

A full fridge forces a choice. You can refuse to buy new food, throw away whatever you have not touched for the longest time, or throw out whatever is closest to its expiry date. Each rule suits a different kind of household, just as each eviction policy suits a different kind of data.

Why memory usage is more than your data

The memory shown on a node is not only the size of your keys and values. The engine also needs space for its internal bookkeeping, for the buffers that feed replicas, and for client connections. That is why Google’s documentation reserves part of node memory as overhead and shows a client memory setting for each node type. If you plan capacity by adding up only your raw data, you will underestimate what you need.

6Data Flow and Instance Lifecycle

There are two journeys to understand: how a single request travels, and how an instance lives from creation to deletion.

The journey of one request

The most common way to use Memorystore is the cache-aside pattern. The application is in charge. It first asks Memorystore for the data. If the data is there, it returns it right away. If not, it asks the database, returns the answer, and also saves a copy in Memorystore with a TTL so the next request is faster.

flowchart LR
  U["User request"] --> A["Application"]
  A --> C{"Found in Memorystore?"}
  C -- "Yes, cache hit" --> R["Return data fast"]
  C -- "No, cache miss" --> D["Read from database"]
  D --> W["Save copy with TTL"]
  W --> R
        
FIG 3 — Cache-aside request flow
Simple Analogy

This is a student keeping a small notebook of answers. Before opening the heavy textbook, the student checks the notebook. If the answer is there, great. If not, the student looks it up in the textbook and writes it in the notebook for next time.

The life of an instance

1

Plan and prepare the network

Choose a region, a network, and the connection method. For Valkey and Redis Cluster this includes setting up a service connection policy for Private Service Connect.

2

Create the instance

Pick the engine, node type, number of shards, number of replicas, and security options such as in-transit encryption and authentication.

3

Connect and load data

Applications connect through the discovery or data endpoint. The cache warms up as requests arrive, or you pre-load important data deliberately.

4

Operate and observe

Watch memory, CPU, connections, and hit ratio in Cloud Monitoring. Adjust sizing as traffic changes.

5

Scale, patch, and upgrade

Add shards, change node types, apply maintenance, or move to a newer engine version while the service keeps running.

6

Retire safely

Take a backup if you need one, move traffic away, then delete the instance. Billing is per second, so unused instances should not linger.

i
Warm-Up Tip

A brand-new cache is empty, so the first wave of traffic will hit the database hard. For big launches, warm the cache with popular data first so the database is not surprised.

7Networking and Connectivity

Memorystore lives on private addresses, so the way you connect your applications is one of the first design decisions you make.

Why Memorystore is never exposed to the internet

A cache often holds sensitive information such as session tokens, user profiles, and shopping carts. For that reason Memorystore does not give instances a public internet address. Applications reach it through private IP addresses inside your Virtual Private Cloud (VPC), which is your own isolated network in Google Cloud. Only workloads that can route into that network can talk to the instance.

Simple Analogy

A private network is like the staff-only corridor of a hotel. Guests in the lobby cannot wander in, but the kitchen team, housekeeping, and the front desk can move through freely. Memorystore sits in that corridor, close to the applications that need it and far from strangers.

Two ways to connect

The older Memorystore services, Memorystore for Redis and Memorystore for Memcached, use Private Service Access or direct peering. In this model, Google’s service network is linked to your VPC by a reserved range of private addresses. It works, but it uses a block of address space and can be tricky when many networks need access.

The newer clustered services, Memorystore for Valkey and Memorystore for Redis Cluster, use Private Service Connect (PSC). With PSC, endpoints are created inside your own network, and each endpoint consumes only a small number of addresses. Google’s documentation highlights simpler management, granular private connectivity, and minimal address consumption as the benefits.

AspectPrivate Service AccessPrivate Service Connect
Used byMemorystore for Redis, MemcachedMemorystore for Valkey, Redis Cluster
Address usageReserves a larger private rangeUses few addresses per endpoint
Setup effortAllocate range, create peeringCreate a service connection policy, then the instance
Multiple networksMore complicatedEndpoints can be created in several VPCs

Multi-VPC access

Large companies often run many separate networks for different teams. Google’s release notes describe multi-VPC support for Memorystore for Valkey, which lets you create Private Service Connect endpoints in multiple VPCs that all point to the same instance. This means a payments team and a catalog team can share one cache without merging their networks.

flowchart LR
  subgraph V1["VPC network A"]
    APP1["Service A"] --> E1["PSC endpoint A"]
  end
  subgraph V2["VPC network B"]
    APP2["Service B"] --> E2["PSC endpoint B"]
  end
  E1 --> INST["Memorystore for Valkey instance"]
  E2 --> INST
        
FIG 4 — Two networks sharing one instance through separate endpoints

Each network gets its own private door into the same room. Traffic never crosses the public internet, and the networks do not need to see each other.

i
Where Your Applications Can Run

Applications on Compute Engine, Google Kubernetes Engine, Cloud Run, and other Google Cloud compute services can reach Memorystore as long as they have a route into the right VPC. Serverless products usually need a connector or direct network egress configured first.

!
Common Mistake

Placing the application in one region and the cache in another. Every request then pays extra network delay and cross-region data charges, which defeats the whole purpose of a fast cache. Keep them in the same region, and ideally spread across the same zones.

8Scaling and Capacity Planning

Memorystore can grow in two directions, wider with more shards or taller with bigger nodes, and the clustered services do both without downtime.

Scaling out versus scaling up

Scaling out means adding more shards. The data is spread across more machines, so total memory and total throughput both increase. Scaling up means changing the node type to a larger one, giving each shard more memory and more processing power. Google’s documentation for Memorystore for Valkey and Redis Cluster describes zero-downtime scaling, up to 250 nodes, and capacity reaching many terabytes.

Simple Analogy

A supermarket has two ways to serve more shoppers. It can open more checkout lanes (scale out) or replace slow cashiers with faster ones and bigger scanners (scale up). Opening more lanes usually helps most when the queue is long. Faster scanners help when each customer takes ages.

What to measure before choosing

Measure 1

Dataset Size

How much data must be held in memory at once, including a safety margin for growth and internal overhead.

Measure 2

Operations Per Second

The number of reads and writes at your busiest moment. Peaks matter more than averages.

Measure 3

Value Size

Large values take more memory and network time. Many tiny values behave very differently from a few big ones.

Measure 4

Read to Write Ratio

Read-heavy workloads benefit from replicas. Write-heavy workloads benefit from more shards.

Replicas: for safety and for reads

Replicas exist mainly to protect against failure, but they also cost money, because each one is another node. Google’s release notes for Memorystore for Valkey mention that each primary node can now have up to five replica nodes. A common starting point for production is at least one replica per shard so that failover is possible. Adding more replicas can help reads in some designs, but it also increases cost and replication traffic.

i
Right-Sizing Tip

Do not leave memory completely full. Free headroom gives the engine room to handle bursts, replication buffers, and background work. Many teams aim to keep usage comfortably below the limit during normal traffic.

Small and large shard counts

Google’s release notes also mention smaller instance shapes of one, two, or four shards for Memorystore for Valkey. These shapes help small and medium workloads start cheaply while still using the modern, cluster-capable service. As the business grows, the instance can be scaled instead of rebuilt.

!
Common Mistake

Adding shards while one single key is the real problem. If a handful of keys get most of the traffic, they live on one shard no matter how many shards exist. This is called a hot key, and it needs a design fix, not just more machines.

A worked example of planning

Imagine an online store expecting two million cached product records, each about two kilobytes, which is about four gigabytes of raw data. After adding overhead for internal structures, replication buffers, and growth over the next year, the team decides to plan for roughly double that amount. They expect around fifty thousand operations per second at the peak of a sale, mostly reads. With these numbers they might choose several mid-sized shards with one replica each, so that capacity is comfortable and the load is spread across machines.

The key lesson is the method, not the numbers. Start from the real data size, add generous headroom, estimate the peak traffic, decide the replica count from your availability needs, and then load test. After launch, watch the real metrics and adjust. Because scaling is possible without downtime, you do not need to guess perfectly on the first day.

9Availability, SLAs, and Maintenance

High availability is a combination of replicas, zones, and good maintenance habits, not a single switch.

Understanding the SLA numbers

An SLA (Service Level Agreement) is a written promise about how much of the time a service will be working. Memorystore’s published SLA depends on the service and how you configure it. Multi-zone Memorystore for Valkey and Redis Cluster instances with high availability enabled are listed at up to 99.99%. Single-zone instances with high availability, and Memorystore for Redis Standard Tier, are listed at 99.9%. Some regions have their own listed values, so always read the current SLA page for the exact number that applies to you.

99.99%
multi-zone HA on Valkey and Redis Cluster
99.9%
single-zone HA and Redis Standard Tier
None
Basic Tier and the nano node type
Simple Analogy

Think of 99.9 versus 99.99 percent as the difference between a shop that might be closed for about nine hours in a year and one closed for under an hour. Each extra nine is much harder and costlier to earn, so pick the level your business truly needs.

The tiers of Memorystore for Redis

In the standalone Memorystore for Redis service, the Basic Tier is a single node with no replication and no automatic failover. It is an ephemeral cache, meaning losing it is acceptable. The Standard Tier adds a replica in another zone with automatic failover, and an option for read replicas. Use Basic for development and non-critical caches. Use Standard for anything where an outage would hurt.

Maintenance without surprises

Every managed service must be patched. Memorystore applies updates for security and reliability, and Google’s release notes describe several tools that make maintenance friendlier for Memorystore for Valkey:

  • Maintenance windows that you can view and set in the Google Cloud console.
  • Self-service maintenance, so you can choose to update an instance to a newer maintenance version sooner.
  • A simulate maintenance event feature that lets you test how your application behaves during a maintenance event before it happens for real.
  • Maintenance changelogs that explain what each update contains, including security fixes.
  • Cloud Logging support for viewing maintenance logs.
i
Fire Drill Tip

Run a maintenance simulation in a test environment. It is like a fire drill: you find out whether your retries, timeouts, and alerts behave sensibly while nothing real is at stake.

1

Set a maintenance window

Choose a quiet time for your business so planned updates happen when traffic is lowest.

2

Rehearse with a simulation

Trigger a simulated maintenance event in staging and watch error rates, latency, and client reconnections.

3

Fix what the drill revealed

Tune timeouts, add retries, and make sure the client refreshes cluster topology promptly.

4

Let production update

Review the changelog, then allow the update during the window with confidence and alerts watching.

Designing for zones and regions

A region is a geographic area such as a city, and a zone is an isolated data center inside that region. Spreading nodes across zones protects you from a single-building problem, such as a power cut. Google’s documentation says that clustered instances distribute replicas across zones automatically, and its release notes describe that an instance can still be created if one zone of the region is unavailable, in which case it is created in the available zones.

Choose the region based on where most users and applications live. A cache that is far from the application loses the speed advantage that justified it. For global businesses, run separate instances close to each major region and decide carefully which data really needs to be shared between them.

Thinking about failure like an engineer

A useful exercise is to list what can break and decide in advance what the application does in each case. A single node failure should trigger automatic failover with a short blip. A zone failure should leave replicas in other zones ready to take over. A full region failure needs either a second region or a plan to rebuild from the database. A mistaken command that flushes the cache needs a plan for protecting the database while the cache refills. Writing these answers down turns surprises into routine procedures.

10Persistence, Backups, and Cross-Region Replication

Memory is temporary by nature, so Memorystore offers several ways to protect data from restarts and regional disasters.

Persistence: surviving a restart

In-memory engines can write their contents to durable storage in two common ways. One takes periodic snapshots, like photographing a whiteboard every few minutes. The other keeps an append-only log of every change, like a diary of each edit, which can be replayed after a restart. Memorystore for Redis Cluster mentions optional append-only-file persistence and backups among its pricing components, which tells us these protections are options you can choose and pay for.

Simple Analogy

A snapshot is a group photo that shows exactly how a room looked at one moment. An append-only log is a security camera recording everything. The photo is lighter to store, but anything that happened after the picture is missing. The recording is more complete but heavier.

Backups

A backup is a saved copy you can restore later, for example after a mistaken bulk deletion or when you want to create a copy of an instance for testing. Google’s release notes show backup management for Memorystore for Valkey as generally available, including management from the Google Cloud console. Backups protect against human error, which is far more common than hardware failure.

Cross-region replication

Zones protect you if one data center has trouble. A whole region can also have problems, though that is rare. Cross-region replication keeps a copy of your instance in a second region. Google’s release notes list cross-region replication for Memorystore for Valkey as generally available, with Terraform support and console support. If the main region fails, you can promote the secondary instance and keep serving traffic from the second region.

flowchart LR
  A["Applications in Region 1"] --> P["Primary instance in Region 1"]
  P -. "Asynchronous replication" .-> S["Secondary instance in Region 2"]
  B["Applications in Region 2"] -.-> S
        
FIG 5 — Cross-region replication for disaster recovery

The dotted line is drawn on purpose. Replication between regions is asynchronous, so the second region may be slightly behind. For a cache, that is usually perfectly fine, since the data can be rebuilt from the database. For data you cannot rebuild, think carefully about how much loss is acceptable.

!
Common Misconception

Believing replicas are backups. A replica copies every change instantly, including a mistaken delete. A backup is a separate saved copy from an earlier moment. You need replicas for availability and backups for recovery.

i
Decision Helper

If your data can be rebuilt from a database within minutes, you may not need persistence at all. If the data lives only in Memorystore, such as sessions or counters you cannot recompute, add backups and consider persistence, because it is no longer just a cache.

Recovery objectives in plain words

Two simple ideas help you decide how much protection to buy. The recovery point objective asks how much recent data you can afford to lose. The recovery time objective asks how long you can afford to be without the service. A pure cache may tolerate losing everything and rebuilding in minutes. A session store may tolerate losing a few seconds of writes but not the whole dataset. Writing these two numbers down makes it clear whether replicas, backups, persistence, or cross-region replication are worth their cost.

i
Test Your Recovery

A backup that has never been restored is only a hope. Practice restoring into a separate test instance so you know the steps, the time required, and any surprises before a real emergency.

11Security in Memorystore

Security is layered: private networks, strong identity, encrypted traffic, and encrypted data at rest.

No single lock protects a house well. You want a fence, a locked door, and a safe for the valuables. Memorystore follows the same layered idea, and Google’s documentation lists several layers you can combine.

Layer 1

Network Isolation

Instances use private IP addresses inside your VPC, so they are not reachable from the public internet.

Layer 2

IAM Integration

Identity and Access Management controls who can create, change, or delete instances. Valkey and Redis Cluster also support IAM-based authentication for connections.

Layer 3

AUTH and ACLs

Password-style authentication, plus access control lists that give different users different permissions, such as read-only.

Layer 4

In-Transit Encryption

TLS scrambles data while it travels between the application and Memorystore so nobody on the path can read it.

Layer 5

Customer-Managed Encryption Keys

CMEK lets you hold the key in Cloud KMS, giving you control over who can decrypt stored data.

Layer 6

Organization Policies

Rules set for a whole company, such as requiring CMEK or limiting which keys may be used. Custom policies are also available.

Certificates and trust

When traffic is encrypted with TLS, the client must trust the server’s certificate. Google’s release notes describe several certificate authority (CA) modes for Memorystore for Valkey. The per-instance mode gives each instance its own certificate. The shared CA mode offers one certificate bundle per region that works for all instances you configure to use it, which reduces the number of certificates your clients must manage. The customer-managed CA mode lets you use your own CA pool hosted on Certificate Authority Service, which helps with strict compliance needs. Google notes that shared and customer-managed CA modes are generally available.

Simple Analogy

A certificate is like an official ID card for the server. Per-instance mode gives every building its own badge design. Shared CA mode is one company badge for every building in a city. Customer-managed mode lets you print the badges yourself with your own stamp.

Encryption at rest and compliance

Customer-managed encryption keys are generally available for Memorystore for Valkey according to the release notes, and organization policy constraints can enforce their use. This matters for industries such as banking and healthcare, where auditors want proof that sensitive data is encrypted with keys the company controls.

!
Common Mistake

Turning off authentication or encryption “just for testing” and forgetting to turn it back on. Treat security settings as part of the instance definition and keep them in your infrastructure code so they cannot silently drift.

i
Least Privilege

Give each application only the access it needs. A reporting service that only reads cached values should not hold permissions to delete everything.

Who should be allowed to do what

Security has two sides that are easy to mix up. The first is control-plane access, meaning who may create, resize, back up, or delete instances. This is managed with IAM roles on your Google Cloud project. The second is data-plane access, meaning who may read and write keys inside the cache. This is managed with authentication, ACLs, and for the clustered services, IAM-based authentication. A person who can delete an instance does not automatically need permission to read cached data, and the reverse is also true.

Separate these duties on purpose. Platform engineers get permission to manage instances. Application service accounts get permission to connect and perform only the commands they need. Auditors may get read-only visibility into configuration and logs. When roles are cleanly separated, a mistake or a compromise in one area cannot easily spread to the others.

Simple Analogy

A hotel gives the building manager a master key to maintain rooms, but guests only get a key for their own room. Nobody expects the manager to read guests’ belongings, and no guest can renovate the building. Memorystore access works best with the same clear separation.

Protect what you cache

Cached data is still real data. Avoid placing secrets such as raw passwords or full payment card numbers in a cache. Store only what the application needs, use short TTLs for sensitive items such as tokens, and remember that a cache may hold personal information that falls under privacy rules. If a user asks to have their data deleted, the cached copy must be deleted as well.

12Monitoring, Logging, and Metrics

You cannot fix what you cannot see, so Memorystore reports its health to Cloud Monitoring and Cloud Logging.

The metrics that matter most

Memorystore integrates with Cloud Monitoring so you can chart metrics and set alerts. Memorystore for Valkey also provides node-level metrics and, according to its release notes, additional node-level metrics and a metric for whether a node is healthy and functioning. Node-level views help you spot a single struggling shard that an instance-wide average would hide.

SignalWhat it tells youWhy you care
Memory usageHow full the instance isNear-full memory leads to evictions or errors
CPU usageHow busy the engine isHigh CPU means slower replies and queueing
Connected clientsHow many connections are openA sudden jump may mean a connection leak
Cache hit ratioShare of requests answered from memoryA falling ratio means the cache is helping less
Evicted keysData removed to free spaceRising evictions mean the cache is too small
Replication lagHow far replicas are behindBig lag raises the risk of data loss on failover
Network trafficBytes moving in and outReveals large values or heavy bursts
Simple Analogy

These metrics are the dashboard of a car. Memory is the fuel gauge, CPU is the engine temperature, and the hit ratio is the miles-per-gallon figure. You do not stare at them every second, but warning lights must exist for the day something goes wrong.

Alerting that people actually respond to

Alerts should be few and meaningful. A good starting set warns when memory stays high for several minutes, when the hit ratio drops sharply, when replication lag grows, and when a node reports unhealthy. Too many noisy alerts train people to ignore them, which is worse than having none.

Logs and client-side visibility

Memorystore sends maintenance logs to Cloud Logging, where you can query and view them. Remember that Memorystore only knows its own side of the conversation. Your application should also record client-side metrics such as request time, timeouts, and retry counts. Comparing the two sides tells you whether a slowdown lives in the service or in the network and code around it.

i
Watch the Ratio, Not Only the Size

A cache can be nearly empty and still perfect, or full and nearly useless. The hit ratio tells you whether the right things are inside. It is often the single best measure of cache health.

!
Common Mistake

Only monitoring the average. A single overloaded shard can hurt users badly while the overall average looks healthy. Look at per-node views as well.

A simple troubleshooting playbook

When users report slowness, resist the urge to guess. Follow a short routine. First, check whether the problem is in Memorystore or in the application by comparing client-side timings with service metrics. Second, look at memory and evictions to see whether the cache has become too small. Third, look at CPU and per-node views to find a single overloaded shard. Fourth, check connection counts for a leak or a sudden surge. Fifth, review recent changes, such as a new release that changed key names or TTLs, and check the logs for maintenance activity around the same time.

1

Confirm where the delay is

Compare how long the application waits with what Memorystore reports. A big gap suggests network or client trouble.

2

Inspect memory and evictions

Rising evictions and a falling hit ratio point to a cache that is too small or keys that never expire.

3

Find hot spots

Use node-level views to see whether one shard carries far more work than the others.

4

Review recent changes

New releases, new features, and maintenance events explain most sudden changes in behavior.

Keep a record of what you find. Over time, these notes become a team guide that makes the next incident faster to solve and helps new engineers learn how the system behaves.

13Design Patterns and Popular Use Cases

The same fast memory can serve very different jobs, from caching pages to powering AI search.

Database Query Caching

Store the results of expensive or frequently repeated database queries. The application uses cache-aside, with a TTL chosen to match how fresh the data must be. This is the classic use and often reduces database load dramatically.

Session Storage

Keep login sessions in Memorystore so any web server can recognize a returning user. Servers become interchangeable, which makes scaling and rolling updates much easier. Google’s own sample documentation for Valkey describes building a session management system with Spring Boot and PostgreSQL.

Leaderboards and Rankings

Sorted sets keep items ordered by score, so a game can show the top ten players instantly even with millions of entries. Google’s samples also include a scalable leaderboard example.

Rate Limiting and Counters

Count how many times a user or service called an API in the last minute and refuse extra calls. Atomic counters with a TTL make this simple and fast, protecting back-end systems from abuse.

Real-Time Messaging

Publish and subscribe features let services broadcast small messages to many listeners, for example live notifications. It is lightweight and fast, but messages are not stored for later, so it is not a replacement for a durable message queue.

Vector Search for Generative AI

Memorystore for Valkey can store and query vector data, which are lists of numbers that represent the meaning of text or images. Applications use this to find similar items quickly, for example to fetch relevant passages for a chatbot. Google’s release notes show vector search as generally available for Valkey, and describe it as an ultra-low-latency data store for generative AI applications.

Simple Analogy

Vector search is like asking a librarian for “books that feel like this one” instead of giving an exact title. The librarian compares meaning, not spelling, and returns the closest matches in an instant.

Choosing a caching strategy

StrategyHow it worksBest when
Cache-asideApplication reads cache first, then database, then fills cacheRead-heavy data that can be slightly stale
Write-throughEvery write goes to cache and database togetherYou need the cache always up to date
Write-behindWrite to cache first, save to database a bit laterVery heavy writes and some risk is acceptable
Time-based expiryData simply disappears after its TTLData that goes stale on a predictable schedule

Choosing a good TTL

A TTL is a balance between freshness and speed. A very short TTL keeps data fresh but sends more requests to the database. A very long TTL gives a high hit ratio but risks showing old information. Ask the business how stale each kind of data may safely be. A product description may be allowed to be an hour old. A stock level may only be allowed to be a few seconds old. An account balance may not belong in a cache at all.

Besides expiry, many teams also delete or update the cached copy whenever the database record changes. This is called invalidation, and it keeps users from seeing outdated values after an edit. Invalidation is famously tricky, so keep it simple: delete the cached key on change and let the next read rebuild it.

Simple Analogy

A TTL is the “best before” date on food. Bread should be fresh within days, while canned beans can wait for years. Putting the same date on everything would either waste good food or serve something spoiled.

Keeping the cache and database consistent

Whenever the same fact lives in two places, they can disagree for a short time. With cache-aside, there can be a brief window where the cache holds an old value after the database has changed. For most pages, nobody notices. For critical data such as inventory at checkout, read the authoritative value from the database at the moment it matters, and use the cache only for browsing. Being honest about where slight staleness is acceptable is the heart of a good caching design.

“A cache is a promise to be fast, and a TTL is the promise to be honest about how old the answer is.”

14Anti-Patterns to Avoid

Most Memorystore trouble comes from a small group of repeated design mistakes, not from the service itself.

ANTI-PATTERN-01 Avoid
Problem

The team treats Memorystore as the only home for important data, such as orders or payments, with no copy in a durable database.

Why It’s Harmful

Memory is designed for speed. A failover, restart, or accidental flush can lose recent data. Replicas copy mistakes as faithfully as they copy good data.

Correct Approach

Keep a durable database as the source of truth. Use Memorystore for copies, sessions, and counters that can be rebuilt, and add backups where data is hard to recreate.

ANTI-PATTERN-02 Avoid
Problem

Keys are stored with no expiry, so the cache fills up with old data that nobody reads again.

Why It’s Harmful

Memory slowly fills, evictions begin, and useful entries get pushed out by useless ones. Costs rise because the instance must keep growing.

Correct Approach

Give almost every cached item a TTL that matches how long the data stays valid, and add a little random variation so many keys do not expire at the same moment.

ANTI-PATTERN-03 Avoid
Problem

A very popular cached item expires and thousands of requests rush to the database at once to rebuild it. This is known as a cache stampede.

Why It’s Harmful

The database is hit by a sudden wave of identical work and can slow down or fail, taking the whole application with it.

Correct Approach

Let only one request rebuild the value while others wait briefly or use the slightly old copy. Refreshing popular items shortly before they expire also helps.

ANTI-PATTERN-04 Avoid
Problem

Huge values, such as entire large documents or big lists with millions of items, are stored under a single key.

Why It’s Harmful

Moving a big value ties up the engine and the network, slowing every other request behind it. The key also lives on only one shard, creating a hot spot.

Correct Approach

Break large data into smaller pieces, store only what you need, and compress where it makes sense.

ANTI-PATTERN-05 Avoid
Problem

The application opens a brand-new connection for every request and closes it afterwards.

Why It’s Harmful

Setting up connections, especially encrypted ones, takes time and resources. Under load, connection counts spike and the service struggles.

Correct Approach

Create connection pools once and reuse them. Use a client library designed for clusters so it learns the topology and reconnects smoothly after failover.

“Most cache outages are not caused by the cache failing, but by an application that never planned for it to.”

15Best Practices and Common Mistakes

A short checklist of habits separates smooth Memorystore deployments from stressful ones.

Habits that pay off

1

Choose the engine on purpose

For new projects needing scale or high availability, start with Memorystore for Valkey or Redis Cluster. Avoid starting new work on a service already on a deprecation path.

2

Place it close to the application

Use the same region and, where possible, matching zones as the workloads using the cache.

3

Enable high availability for production

Use replicas and multi-zone placement for anything users depend on. Reserve the Basic Tier and nano nodes for experiments.

4

Design keys carefully

Use clear, consistent key names with a prefix for the feature or service. This makes debugging and cleanup far easier.

5

Plan for failure in code

Use timeouts, retries with growing pauses, and a fallback to the database when the cache is briefly unavailable, while protecting the database from overload.

6

Define infrastructure as code

Keep instance settings in version-controlled templates so changes are reviewed, repeatable, and easy to roll back.

7

Rehearse maintenance and scaling

Use simulated maintenance events and load tests in staging, so production changes are never a first attempt.

Mistakes that appear again and again

Mistake 1

Guessing the size

Picking a size without measuring leads to either wasted money or constant evictions. Measure first, then adjust.

Mistake 2

Ignoring evictions

Rising evictions are a clear signal that memory is too small or data is not expiring properly.

Mistake 3

Hard-coded node addresses

Node endpoints can change during maintenance and scaling. Always rely on the discovery endpoint and a cluster-aware client.

Mistake 4

One cache for everything

Mixing sessions, queues, and caches in one instance means a problem in one workload harms the rest. Separate critical workloads.

Mistake 5

Skipping load tests

A cache that works for a hundred users may behave very differently for a hundred thousand. Test with realistic traffic.

Mistake 6

Forgetting cost reviews

Oversized instances and idle test environments quietly add to the bill. Review usage regularly and delete what you do not need.

i
Modern Client Tip

Google’s release notes mention that Valkey GLIDE, an open-source client library, can connect applications to Memorystore for Valkey. Choosing a modern, cluster-aware client with good reconnection behavior is one of the cheapest reliability improvements you can make.

16Advantages, Trade-offs, and Cost Thinking

Every technology trades something for something else, and Memorystore is no exception.

Advantages

  • Very fast reads and writes, which lowers page load times and database pressure.
  • Fully managed patching, failover, replication, and monitoring integration.
  • Compatible with open-source engines, so existing clients and skills carry over.
  • Zero-downtime scaling and strong availability on Valkey and Redis Cluster.
  • Private networking, IAM, encryption, and compliance features built in.
  • Per-second billing and easy start and stop for flexible costs.

Disadvantages / Trade-offs

  • Memory is costly compared with disk, so large datasets can become expensive.
  • Only a subset of open-source commands is supported on some services, so check compatibility.
  • Instances are private, so access from outside Google Cloud needs extra network design.
  • Cached data can be stale, so applications must tolerate small differences from the database.
  • Less control than self-managing, for example over certain low-level settings and patch timing.
  • Choosing the wrong engine can force a migration later.

How the bill is built

Google states that Memorystore pricing varies by capacity, number of replicas, and region, with per-second billing. For Memorystore for Redis Cluster, the main drivers are the node type, the number of nodes, the region, the replica count, and optional features such as persistence and backups. Total nodes equals shards multiplied by one plus the replicas per shard, so a three-shard cluster with two replicas per shard uses nine nodes.

Simple Analogy

Renting nodes is like renting hotel rooms. Each shard is a family, and every replica is an extra room booked for a relative. Bigger rooms cost more, and so does a more expensive city. Count every room before you look at the total.

i
Cost Tip

The cache pays for itself when it saves more database and compute cost than it adds. A high hit ratio is the best evidence. If the hit ratio is poor, fix the caching design before buying a bigger instance. Always check the official pricing page for current rates, because prices change.

!
Common Mistake

Forgetting development and test instances. Per-second billing is friendly, but an unused instance left running for months still adds up. Delete or schedule them.

Memorystore versus running it yourself

Some teams consider installing Valkey or Redis on their own virtual machines or on Kubernetes. This gives maximum control and sometimes a lower raw price. It also makes the team responsible for upgrades, security patches, failover testing, backup jobs, monitoring, capacity planning, and late-night incidents. For many companies the engineering time saved by a managed service is worth more than the extra cost of the service. For very specialized needs, such as unusual modules or settings that the managed service does not permit, self-management may still make sense.

QuestionMemorystoreSelf-managed
Who patches and upgrades?Google, with your maintenance window and optionsYour team
Who handles failover?Automatic, built into the serviceYou design, test, and maintain it
How much control?Moderate, within supported settingsVery high
Where does effort go?Application design and tuningOperations and reliability work

17Real-World and Industry Examples

Different industries lean on in-memory speed in different ways, and the patterns repeat across them.

E-Commerce and Grocery Delivery

Product pages, prices, inventory counts, and shopping carts are read constantly. Google’s Memorystore page features Instacart, an online grocery company, among its customer stories. Caching product and cart data keeps pages quick during evening rushes.

Online Gaming

Games need live leaderboards, matchmaking queues, and player session data that change every second. Sorted sets and fast counters suit these needs, and the data can be rebuilt from a database if the cache is ever lost.

Financial Services

Banks and payment companies use caches for rate limiting, short-lived authentication tokens, and fast reference data such as currency rates. Strong security features, such as customer-managed keys and private networking, matter greatly here.

Media and Streaming

Streaming platforms cache content catalogs, personalized recommendations, and viewing progress so that millions of users see responsive screens at the same time.

Generative AI Applications

Chatbots and search assistants keep conversation history and similarity data close to the application. Valkey’s vector search supports finding related content quickly, and Google’s release notes also mention a preview remote MCP server for connecting AI applications to Memorystore for Valkey.

Read-heavy
workloads gain the most from caching
Spiky
traffic is smoothed by a fast front layer
Real-time
features need data answered in milliseconds
Simple Analogy

A popular coffee shop keeps the most-ordered drinks’ ingredients within arm’s reach of the barista. On a normal day this saves seconds. On the morning rush it saves the whole business from a line out the door.

18Migration and Choosing Your Path

Whether you are coming from your own servers, an older Memorystore service, or Memcached, there is a path forward.

Common starting points

From

Self-Managed Redis or Valkey

Google lists the RIOT tool for migrating Redis deployments. Release notes also describe a feature for migrating workloads from self-managed Redis and Valkey on Google Cloud into Memorystore for Valkey, marked generally available in 2026.

From

Memorystore for Memcached

Google recommends moving to Memorystore for Valkey and publishes a migration guide, since Memcached support is scheduled to end in January 2029.

From

Memorystore for Redis (standalone)

Consider Memorystore for Redis Cluster or Valkey when you need larger scale, higher SLAs, or newer features.

From

Another Cloud’s Cache

Because the engines are open-source compatible, applications often need little code change, though networking and security must be rebuilt.

A safe migration order

1

Check compatibility

List the commands, data types, modules, and client libraries your application uses, and compare them with what the target service supports.

2

Build the target and test

Create the new instance, connect a staging copy of the application, and run realistic load against it.

3

Copy or warm the data

Use a migration tool, or simply start empty and let the cache warm, since caches can usually be rebuilt.

4

Shift traffic gradually

Move a small share of requests first, watch the metrics, and increase step by step.

5

Retire the old system

Keep the old instance briefly as a fallback, then delete it once everything is stable.

flowchart TD
  Q1{"New project or existing cache?"} -->|"New"| Q2{"Need large scale or 99.99 percent SLA?"}
  Q1 -->|"Existing Memcached"| V["Plan move to Memorystore for Valkey"]
  Q2 -->|"Yes"| VC["Memorystore for Valkey or Redis Cluster"]
  Q2 -->|"No, small or simple"| Q3{"Need replication and failover?"}
  Q3 -->|"Yes"| ST["Valkey small shape or Redis Standard Tier"]
  Q3 -->|"No, dev or test only"| BA["Basic Tier or smallest Valkey shape"]
        
FIG 6 — A simple decision path for choosing a Memorystore service

The flow above is a starting guide, not a rule. If your needs are unusual, such as strict compliance or special commands, confirm details in the current documentation before committing.

!
Check Before You Move

Memorystore supports a subset of open-source commands on some services. Test the exact commands your application depends on before cutting over, not after.

19Frequently Asked Questions

Quick answers to the questions beginners and intermediate engineers ask most often.

Q1Is Memorystore a database?

It stores data, but it is best thought of as a fast data layer beside your main database. It is great for caching, sessions, counters, and similar jobs, while your durable database remains the source of truth.

Q2Which Memorystore engine should I choose for a new project?

For most new work needing scale, high availability, or modern features such as vector search, Memorystore for Valkey is the natural starting point. Memorystore for Redis Cluster suits teams with a strong Redis focus. Standalone Redis fits small, simple needs.

Q3What is the difference between Valkey and Redis?

Valkey began as a community fork of Redis and is developed under the Linux Foundation. They speak a compatible protocol, so many clients work with both. Over time, features and versions can differ, so check supported versions and commands.

Q4Can I connect to Memorystore from the public internet?

No. Memorystore uses private IP addresses inside your VPC. Applications must run in Google Cloud or connect through private network links, such as a VPN or interconnect, that route into your VPC.

Q5Will I lose data during failover or maintenance?

You may see brief connection errors, and because replication is usually asynchronous, the very latest writes could be lost in rare failover cases. Well-designed clients retry, and caches can be rebuilt from the database.

Q6How do I know if my cache is working well?

Watch the hit ratio, latency, memory usage, and evictions. A high hit ratio with steady latency and low evictions means the cache is doing its job.

Q7Do I need replicas?

For production, yes. Without a replica, losing a node means losing that shard until it is rebuilt. Replicas, ideally in a different zone, give you automatic failover and the higher SLA tiers.

Q8Can I scale without downtime?

Google documents zero-downtime scaling for Memorystore for Valkey and Redis Cluster, both by adding shards and by changing node types. Clients should still be cluster-aware so they follow the new layout.

Q9Is Memorystore for Memcached going away?

Google’s documentation says it stopped being a recommended service on January 20, 2026, and customer support ends on January 31, 2029. Plan a migration, preferably to Memorystore for Valkey.

Q10How is Memorystore billed?

Billing depends on the service, capacity or node type, number of nodes and replicas, region, and optional features, with per-second billing. Check the official pricing pages for current rates.

Q11Can Memorystore help with AI applications?

Yes. Memorystore for Valkey supports storing and searching vector data, which suits retrieval for chatbots and recommendation features, and it offers low-latency storage for conversation state.

Q12What should I do first if latency suddenly rises?

Check CPU, memory, connection counts, and node-level metrics for one overloaded shard. Then look for large values, hot keys, a recent deployment, or maintenance activity in the logs.

20Summary and Key Takeaways

Memorystore gives Google Cloud applications a fast shelf next to the stove. It removes the chores of running in-memory servers and lets teams concentrate on how data is cached, secured, and scaled. The family has grown and shifted: Valkey and Redis Cluster lead for scale and availability, standalone Redis remains for simpler needs, and Memcached is on a retirement path. Success comes less from clicking the right settings than from good habits: sensible TTLs, cluster-aware clients, careful monitoring, layered security, and a design that survives failover calmly.

Key Takeaways

  • Memorystore is a managed in-memory service — it supports Valkey, Redis Cluster, Redis, and Memcached, and handles patching, replication, and failover for you.
  • Pick the engine deliberately — Valkey and Redis Cluster offer horizontal scaling and up to a 99.99% SLA, while Memcached is deprecated and support ends in January 2029.
  • Think in shards, nodes, and replicas — shards add capacity, replicas add safety, and hash slots tell clients where each key lives.
  • Keep connections private and modern — use Private Service Connect for clustered services, keep the cache near your applications, and never hard-code node addresses.
  • Layer your security — combine private networking, IAM, ACLs, TLS, certificate modes, and customer-managed keys to protect cached data.
  • Watch the right signals — hit ratio, memory, evictions, replication lag, and per-node health reveal problems before users do.
  • Design for failure and freshness — use TTLs, retries, and a durable database as the source of truth so the cache stays fast without being fragile.