Choosing ElastiCache Engines and Deployment Options
This lesson explains how the engine and deployment option of Amazon ElastiCache, a managed in-memory data store, determine what the cache can do and how it scales.
Learning outcomes
After completing this lesson, you will be able to:
- Choose between Valkey, Redis OSS and Memcached.
- Choose between ElastiCache Serverless and node-based clusters.
Engines
ElastiCache supports three engines. Valkey, an open-source fork of Redis OSS backed by the Linux Foundation, is AWS's recommended engine and is priced lower than Redis OSS. Redis OSS is supported for existing workloads. Both offer rich data structures (strings, hashes, lists, sets, sorted sets, streams), replication, Multi-AZ automatic failover, snapshots and backups, encryption, authentication and pub/sub. Memcached is a simple, multithreaded key-value cache with no replication, no persistence and no failover; nodes are independent, and data on a failed node is lost. Choose Memcached only for a simple cache where losing data is acceptable and multithreaded scaling matters.
Valkey or Memcached?
Serverless and node-based clusters
ElastiCache Serverless creates a cache without choosing node types or counts. It scales memory and compute automatically, replicates across multiple AZs, and charges for data stored and ElastiCache Processing Units consumed, with optional maximum limits. It is the least-effort option for variable workloads. Node-based clusters give full control of node types, shard and replica counts, maintenance windows and reserved node pricing.
For Valkey and Redis OSS node-based clusters, cluster mode disabled means one shard with one primary and up to five replicas, so all data must fit in one node's memory and writes scale only vertically. Cluster mode enabled partitions data across up to 500 shards, each with a primary and replicas, so both memory and write throughput scale horizontally, and shards can be added online. The following table summarises the options.
| Option | Scaling | High availability | Use when |
|---|---|---|---|
| Serverless (Valkey, Redis OSS, Memcached) | Automatic | Built-in multi-AZ | Variable load, least management |
| Valkey/Redis OSS, cluster mode disabled | Scale up; add read replicas | Replicas with Multi-AZ failover | Dataset fits one node |
| Valkey/Redis OSS, cluster mode enabled | Add shards online | Replicas per shard, Multi-AZ | Large datasets or high write throughput |
| Memcached node-based | Add or remove nodes | None | Simple multithreaded cache; data loss acceptable |
The following diagram compares the two deployment options.

Choosing an engine
A team needs a session store for a web application and a leaderboard ranked by score, must survive the loss of a node or AZ without losing sessions, and wants minimal management. Memcached is ruled out by the need for sorted sets and failover. ElastiCache Serverless for Valkey meets every requirement: sorted sets for the leaderboard, multi-AZ replication and automatic scaling. A node-based Valkey cluster with cluster mode enabled would also work but requires capacity planning.
Does serverless ElastiCache need replication to be configured?
Show answer
No. It scales automatically and has built-in replication across Availability Zones.
Exam Tips
Remember for the exam
- Valkey is AWS's recommended engine; Redis OSS remains supported.
- Memcached has no replication, persistence or failover.
- Serverless ElastiCache scales automatically with built-in multi-AZ replication.
- Cluster mode enabled shards data to scale memory and writes horizontally.