Easy ReviewSAA-C03
Design Resilient Architectures19

ElastiCache

Choose cache deployment, scaling, durability, and regional recovery features for ElastiCache.

ElastiCache provides Valkey, Redis OSS, and Memcached caches. Match the engine and deployment type to application caching, capacity, and recovery requirements.

Engines, replicas, and Multi-AZ

ElastiCache keeps data in memory to serve application reads without repeatedly querying an underlying database. Choose an engine and a deployment type before deciding how to partitionA shard holds part of a Valkey or Redis OSS dataset with a primary and optional replicas. data, add replicas, or recover from failure.

How it works

  1. Choose Serverless to let AWS manage capacity, or node-based caches when you need control of nodes and placement. Node-based caches use a subnet groupA subnet group identifies the VPC subnets eligible to host node-based cache nodes., a set of eligible VPC subnets; Serverless receives subnet IDs directly.
  2. Implement lazy loadingCache-aside reads the database on a cache miss and places the result in the cache., also called cache-aside. Read the cache first. On a cache missA cache miss occurs when a requested value is absent or expired., meaning the value is absent or expired, query the database and populate the cache. Address stale values with write-throughWrite-through updates the cache when the application writes data to its database. updates or a time to liveA time to live specifies how long a cached value remains valid before expiration. (TTL), an expiration duration.
  3. For Valkey or Redis OSS, split data across shards, partitions with a primary node for writes and optional replicas for reads. Enable Multi-AZ to place a replica in another Availability ZoneAn Availability Zone is a separate placement location within an AWS Region used to isolate failures., a separate failure location within a Region.
  4. On primary failure, ElastiCache promotes the replica with the least lag, meaning the smallest delay behind the primary, and updates the primary endpointAn endpoint is the address an application uses to connect to a cache node or cluster.’s DNS address. Non-durable replication is asynchronous, so recent writes may be lost.
  5. Configure authentication, backups, and operational logs for the selected deployment. AUTH requires encryption in transit; role-based access controlRBAC assigns cache users permissions for particular commands and keys. (RBAC) uses users and user groups to restrict commands and keys.
Scaling need Mechanism
More per-node capacity Change to a larger Valkey or Redis OSS node type
More partitions and write capacity Add shards with cluster mode enabled
More replica read capacity Add read replicasA read replica holds a copy of primary data and serves read requests.
Automatic shard or replica adjustment ElastiCache Auto Scaling on supported cluster mode enabled configurations
Capacity without node management Serverless
Node-based Memcached growth Partition data across more nodes; these nodes do not replicate each other

Exam cues

  • If the question says repeat database reads dominate load, think cache-aside, because cache hitsA cache hit finds the requested unexpired value in the cache. avoid those database queries.
  • If the question says survive an Availability Zone failure, think Multi-AZ replicas, because a replica in another Zone can become primary.
  • If the question says spread write load across data partitions, think shards, because adding read replicas does not create additional writable partitions.
  • If the question says analyze slow cache commands centrally, think slow log delivery to CloudWatch Logs or Data Firehose on supported node-based versions, because serverless caches do not support that log delivery.

Remember

  • With cluster mode disabled, use the primary endpoint for writes and reader endpoint for replica connections. With cluster mode enabled, use the configuration endpoint and a cluster-aware client.
  • Cluster mode enabled defaults to Multi-AZ and requires automatic failover.
  • Valkey, Redis OSS, and Serverless Memcached support snapshots. Node-based Memcached does not. A restore creates a new cache.
  • June 2026: AWS introduced optional durability for Valkey 9.0 and later. It requires node-based cluster mode enabled, Multi-AZ, and a replica per shard.
  • Synchronous durability logs writes across at least two Zones before acknowledging them. Asynchronous durability can lose up to 10 seconds of uncommitted writes.
  • Durability is unavailable for Serverless and Global Datastore clusters.

Trap: A read replica, a snapshot, and a transactional durability log solve different failure problems. Multi-AZ alone on a non-durable cluster does not guarantee preservation of every acknowledged write.

A replica in another Availability Zone can become primary
Availability Zone AAvailability Zone B12ApplicationPrimaryRead replica
  1. The application sends writes to the primary endpoint.

  2. The primary replicates to the read replica; Multi-AZ can promote a replica on failure.

From the AWS docs (28)
  • ElastiCache provides managed in-memory caches and data stores using Valkey, Redis OSS, or Memcached.
  • ElastiCache Serverless manages cache capacity without customers provisioning or configuring cache nodes.
  • Valkey and Redis OSS cluster mode enabled partitions data across shards, each with a read/write primary and optional read-only replicas.
  • Node-based Memcached partitions data across nodes rather than replicating data between them.
  • Lazy loading checks the cache first; on a miss, the application reads the database and writes the result to the cache.
  • Lazy-loaded cache values can become stale after database changes; write-through updates or time to live can address stale data.
  • A time to live sets how long a cached value remains valid before expiration.
  • Multi-AZ distributes replicas across Availability Zones and enables automatic failover, requiring a replica in a different Zone.
  • On primary failure, ElastiCache promotes the replica with the least replication lag and updates the primary endpoint DNS.
  • Cluster mode enabled has Multi-AZ enabled by default and requires automatic failover.
  • Without durability enabled, asynchronous replica lag can cause data loss when a primary fails.
  • Cluster mode disabled uses the primary endpoint for writes and the reader endpoint to spread connections among replicas.
  • Cluster mode enabled uses its configuration endpoint with a cluster-aware Valkey or Redis OSS client.
  • Changing to a larger Valkey or Redis OSS node type increases per-node read and write capacity.
  • ElastiCache Auto Scaling can adjust shards or replicas in supported cluster mode enabled Valkey and Redis OSS configurations.
  • ElastiCache Auto Scaling is not supported for Global Datastore clusters.
  • Valkey, Redis OSS, and Serverless Memcached support snapshot backup and restore; node-based Memcached does not.
  • Restoring an ElastiCache backup creates and populates a new cache.
  • Node-based Valkey and Redis OSS AUTH tokens require encryption in transit.
  • Role-based access control assigns command and key access permissions to users organized in user groups.
  • Supported node-based Valkey and Redis OSS versions can deliver slow and engine logs to CloudWatch Logs or Data Firehose; serverless caches do not support this log delivery.
  • Node-based caches in a VPC use a subnet group for subnet and IP placement; Serverless takes subnet IDs directly.
  • AWS announced ElastiCache durability for Valkey 9.0 and later in June 2026.
  • Durable synchronous writes are persisted across at least two Availability Zones in a transactional log before acknowledging the client.
  • Durable asynchronous writes acknowledge before log persistence and can lose up to 10 seconds of uncommitted data on failure.
  • Durability requires node-based Valkey 9.0 or later with cluster mode enabled and Multi-AZ with at least one replica per shard.
  • Durability is not supported with ElastiCache Serverless or Global Datastores.
  • ElastiCache for Valkey or Redis OSS version 7 or later can authenticate connections with IAM identities instead of passwords.

Use cases and engine choice

ElastiCache is more than a database cache. Valkey and Redis OSS add data structures, replication and pub/sub; Memcached stays a simple, multi-threaded object cache.

How it works

  1. Pick the engine from the features you need.
  2. Valkey or Redis OSS: rich types (sorted sets, hashes), replicas, Multi-AZ, pub/sub.
  3. Memcached: plain key-value objects, many threads per node, scale by adding nodes.
Need Engine
Leaderboards, counters, rich data types Valkey or Redis OSS
Replicas, Multi-AZ failover, backups Valkey or Redis OSS
Pub/sub messaging Valkey or Redis OSS
Simplest multi-threaded object cache Memcached

Exam cues

  • If the question says leaderboard or ranking in real time, think ElastiCache with sorted sets.
  • If the question says high availability, replication or persistence for a cache, think Valkey or Redis OSS.
  • If the question says simple object caching on large multi-core nodes, think Memcached.

Remember

  • Sorted sets for leaderboards; pub/sub on Valkey and Redis OSS.
  • Memcached: no replication, no pub/sub, simple types.

Trap: “In-memory” doesn’t settle the choice. Any need for replicas, failover or rich data types rules out Memcached.

From the AWS docs (7)
  • Valkey and Redis OSS sorted sets keep unique, ordered elements, which moves the work of real-time leaderboards such as top-10 scores from the application to ElastiCache.
  • Valkey and Redis OSS on ElastiCache support pub/sub messaging, where publishers send to a channel and every subscriber of that channel receives the message.
  • Choose ElastiCache for Memcached for the simplest model, large multi-threaded nodes, scaling nodes in and out, and caching objects.
  • Unlike Memcached, Valkey and Redis OSS on ElastiCache support complex data types, replication for high availability and pub/sub.
  • Caching the results of expensive queries, such as joins across many tables or heavy calculations, means the database pays for the query once and later reads come from memory.
  • Valkey and Redis OSS on ElastiCache support geospatial indexes; Memcached does not.
  • For Memcached clusters, ElastiCache Auto Discovery lets client programs find every node and keep connections to all of them as nodes are added or removed; it is not available for Valkey or Redis OSS.

Flashcards

tap to flip
Answer

·

All 19 cards as a list

How does a node-based ElastiCache Valkey or Redis OSS deployment survive a primary node or Availability Zone failure?

Use replicas across Zones with Multi-AZ automatic failover. ElastiCache promotes the least-lagging replica and updates primary-endpoint DNS. Without durability, replication lag can cause data loss.

A relational database repeats expensive reads for unchanged results. How can an application use ElastiCache to reduce those reads?

Use lazy loading, also called cache-aside: check the cache, query the database on a miss, then cache the result. Plan updates or expiration to handle stale values.

An ElastiCache Valkey workload needs more write capacity across multiple data partitions. Should it add only read replicas?

No. Use cluster mode enabled and add shards to partition data. Replicas within a shard serve reads; a larger node type is another capacity option.

Does every ElastiCache Memcached deployment lack backup support?

No. Serverless Memcached supports snapshots. Node-based Memcached does not support snapshot backup and restore.

Which connection endpoints should an application use for node-based ElastiCache Valkey or Redis OSS?

With cluster mode disabled, use primary for writes and reader for replica connections. With cluster mode enabled, use the configuration endpoint and a cluster-aware client.

A team needs node-based ElastiCache clients restricted to specific commands and keys. Which feature fits?

Role-based access control with users and user groups. A shared AUTH token alone does not define those per-user permissions.

Can an ElastiCache AUTH token secure a node-based Valkey connection without encryption in transit?

No. AUTH requires encryption in transit.

A team wants persistent acknowledged writes in node-based ElastiCache Valkey. Which durability mode fits?

Synchronous durability on a supported Valkey 9.0 or later cluster. It persists writes across at least two Zones before acknowledgment.

A read-heavy application needs to reduce database reads with Amazon ElastiCache. How does lazy loading work?

The application checks the cache first. On a miss, it reads the database and stores the result in the cache.

A team wants an in-memory cache without provisioning or configuring cache nodes. Which Amazon ElastiCache option fits?

ElastiCache Serverless manages cache capacity without requiring customers to provision or configure nodes.

A team wants ElastiCache to adjust its cache capacity automatically. Which deployment or feature fits?

Serverless manages capacity automatically. Supported node-based cluster mode enabled configurations can use ElastiCache Auto Scaling for shards or replicas.

How can applications reach an ElastiCache for Valkey cache without storing a password?

IAM authentication (Valkey or Redis OSS 7 and later), with access granted by IAM policies.

A mobile game needs a real-time global leaderboard that updates with every score change for millions of players. Which service and data structure fit?

ElastiCache for Valkey or Redis OSS with sorted sets.

A team needs the simplest multi-threaded object cache, scaling by adding and removing nodes, and doesn't need replication. Which ElastiCache engine fits?

ElastiCache for Memcached.

A cache must survive a node failure with replicas and automatic failover. Is ElastiCache for Memcached the right engine?

No. Memcached has no replication; use Valkey or Redis OSS with replicas and Multi-AZ.

Which ElastiCache engines support pub/sub messaging?

Valkey and Redis OSS (not Memcached).

Which two workloads does ElastiCache help: read-heavy workloads, write-heavy workloads, compute-intensive workloads, ETL, or complex JOIN queries run in the cache?

Read-heavy and compute-intensive workloads. The cache stores results of expensive queries or calculations so they run once. It does not run JOINs or ETL itself.

A cache in front of a relational database must support geospatial queries. Which ElastiCache engine fits?

Valkey or Redis OSS, which have geospatial indexes. Memcached does not support them.

An app stores sessions in an ElastiCache Memcached cluster that scales its node count. How do clients keep track of the nodes?

Memcached Auto Discovery, which lets clients find all nodes and connect to them automatically. It exists only for the Memcached engine.

You finished every topic of SAA-C03!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified Solutions Architect - Associate (SAA-C03) on Easy Review. Come study too!