Introducing Dragonfly Cloud! Learn More

Question: Is ElastiCache persistent?

Answer

ElastiCache provides two types of caching engines: Memcached and Redis.

Memcached engine in ElastiCache is designed to be an in-memory cache, which means it does not provide any built-in mechanism for persistent storage of cached data. This implies that the cached data will be lost if the node(s) hosting the cache cluster fail or when the cache cluster is modified, restarted, or deleted.

On the other hand, Redis engine in ElastiCache provides multiple options for persistent storage of cached data. Redis has an option to persist data to disk regularly (Snapshotting), and also provides an append-only file (AOF) option that logs all changes made to data in Redis. Redis also allows specifying a retention period for keys, allowing old data to be automatically removed after a certain period. Redis provides various durability levels, from no persistence to high availability with automatic or manual failover.

In summary, whether ElastiCache is persistent depends on the caching engine used. Memcached is designed as an in-memory cache without any built-in mechanism for persistent storage, while Redis provides multiple options for persistent storage.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.