Easy ReviewDOP-C02
Resilient Cloud Solutions25

ElastiCache

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

Este conteúdo de estudo ainda não foi traduzido, então aparece em inglês. Ajude a traduzir

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.

Da documentação da AWS (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.

Da documentação da AWS (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.

Global Datastore

Global Datastore maintains a writable Valkey or Redis OSS cache cluster in one Region and read-only copies in other Regions. It supports regional read access and a recovery path when the writer Region is unavailable.

How it works

  1. Start with a node-based primary cluster. Add secondary clusters in other Regions in the same AWS account.
  2. Send writes to the primary. ElastiCache replicates them asynchronously, meaning secondaries can temporarily lag behind it, while secondary clusters serve regional reads.
  3. Keep required cluster settings aligned across Regions. Read-replica counts can differ to suit regional demand.
  4. For cross-Region recovery, manually promote a secondary. When promotion finishes, the old primary becomes secondary. Update the application to write to the new primary Region.

Exam cues

  • If the question says one cache writer and local reads in distant Regions, think Global Datastore, because its secondary clusters serve regional reads.
  • If the question says automatically recover a node within one Region, think regional Multi-AZ failover, because it promotes a local replica.
  • If the question says recover writes in another Region, think manual Global Datastore promotion and application routing updates, because cross-Region failover is not automatic.

Remember

  • One primary can replicate to secondary clusters in up to two other Regions.
  • Global Datastore supports node-based Valkey and Redis OSS, within one account.
  • Node types, engine versions, primary-node counts, and shardA shard holds part of a Valkey or Redis OSS dataset with a primary and optional replicas. counts must match. Read-replica counts may differ.
  • ElastiCache Auto Scaling and durability-enabled clusters are not supported with Global Datastore.

Trap: A secondary cluster remains read only until promoted. Regional automatic failover does not move the writable role to another Region.

One writer Region replicates to read-only Regions
Primary RegionSecondary Region BSecondary Region C12Read and writeRead onlyRead only
  1. The primary cluster asynchronously replicates writes to a secondary cluster.

  2. An optional second secondary receives the same primary writes in another Region.

Da documentação da AWS (13)
  • Global Datastore replicates node-based Valkey or Redis OSS clusters across AWS Regions.
  • The primary cluster accepts reads and writes; secondary clusters accept reads only until promoted.
  • Global Datastore replication from primary to secondary clusters is asynchronous.
  • A Global Datastore can have secondary clusters in up to two other Regions.
  • Global Datastore does not automatically fail over across Regions; a secondary can be promoted manually.
  • After secondary promotion, update the application to send writes to the new primary Region.
  • After promotion completes, the former primary becomes a secondary and stops accepting writes.
  • Global Datastore member clusters use matching node types, engine versions, primary-node counts, and shard counts; read-replica counts can differ.
  • Global Datastore does not support cross-account deployments.
  • Global Datastore is available only for node-based clusters, not Serverless.
  • Global Datastore regional clusters can use automatic failover to their regional replicas.
  • ElastiCache Auto Scaling is not supported for clusters in Global Datastores.
  • Global Datastore is not supported with durability-enabled ElastiCache clusters.

Flashcards

toque para virar
Resposta

·

Todos os 25 flashcards em lista

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.

Which ElastiCache feature provides cross-Region replication, and where can applications write?

Global Datastore for node-based Valkey or Redis OSS. Only the primary cluster accepts writes; secondary Regions serve reads until promoted.

An application needs local cache reads in two additional Regions while retaining one writer Region. Which ElastiCache feature fits?

Global Datastore. It asynchronously replicates the primary to secondary clusters in up to two other Regions.

An ElastiCache Global Datastore primary Region fails. Does Multi-AZ automatically promote a secondary Region?

No. Regional automatic failover uses local replicas. Cross-Region recovery requires a manual secondary promotion and an application routing update.

Can a company attach ElastiCache Serverless caches in separate accounts to one Global Datastore?

No. Global Datastore requires node-based clusters within the same AWS account.

A Global Datastore secondary Region needs more read capacity than another secondary. Must their replica counts match?

No. Read-replica counts may differ, while member node types, engine versions, primary counts, and shard counts must match.

Can an ElastiCache Global Datastore use durability-enabled Valkey clusters?

No. Global Datastore does not support durability-enabled clusters.

Você concluiu todos os tópicos da DOP-C02!

Seu badge ficou dourado. Próximo passo: agendar a prova na AWS. Depois de passar, adicione-se ao Quem passou.

Compartilhar

Conte que você concluiu esta certificação

Concluí todos os tópicos da AWS Certified DevOps Engineer - Professional (DOP-C02) no Easy Review. Venha estudar também!