Persistence overview

This page provides an overview of persistence for Memorystore for Valkey.

Memorystore for Valkey supports two types of persistence:

Note: You can either enable AOF or RDB persistence for your instance, not both.

For the best instance availability and data durability, we recommend enablingboth persistence andhigh availability.While persistence and high availability overlap in the protection they offer, they havedifferent strengths that complement each other. HA can be considered the firstline of defense against individual node failures andzonal outages. Persistence provides disaster recovery for rare events when allnodes in a shard fail and HA is unable to help.

Choose a persistence type

Choosing between AOF and RDB persistence comes down to a choice betweenperformance and data durability. These tradeoffs are generally true of allmanaged Valkey services because of the nature of AOF and RDB persistence in OSSValkey.

If your top priority is data durability and preserving the highest percentage ofwrites sent to your Valkey server, we recommend choosing AOF persistence. AOF'sability to persist data every second (or for every write) offers superior datadurability compared to RDB snapshots which save data on an hourly basis.

If performance is your top priority, we recommend using RDB persistence becauseit usually places lower performance demands on your instance than AOF persistencedoes for a similarly sized instance. If you are comfortable with some stalenessin your data on recovery and you want the performance that RDB persistence providesfor a similarly sized instance, then RDB persistence is the better choice foryou.

It is possible to have both high throughput with the durability of AOFpersistence. To get both you can enable AOF persistence and also choose a highshard count. A high shard count provides more vCPUs which improves performance. However, somelatency increase is expected for AOF in any configuration.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.