ElastiCache and MemoryDB choices
Choose the job before the product
Amazon ElastiCache provides managed in-memory caching using Valkey, Redis OSS or Memcached. Valkey and Redis OSS support structures such as strings, hashes and sorted sets; Memcached is suited to simpler key/value caching. A bookstore can cache serialized descriptions in any of these engines, but a leaderboard may benefit from sorted sets. Check exact command support, client version and engine version before choosing.
Serverless or node-based
Serverless ElastiCache manages capacity for you, while node-based deployments give greater control over node sizing and placement. Serverless clients need TLS; Valkey and Redis OSS clients also need cluster-protocol compatibility. Node-based deployment may require planning shards and replicas. Shards distribute data; replicas provide copies and may serve reads depending on configuration. Replica reads can lag. Do not assume every upstream command is allowed in a managed service.
Product cards → ElastiCache candidateSorted leaderboard → Valkey candidateDurable in-memory primary → MemoryDB candidateDurability changes the decision
MemoryDB is designed as a durable primary in-memory database with Valkey/Redis OSS compatibility and a transaction log across Availability Zones. Compare it when data must survive node failure and the application needs these data structures. Do not classify all ElastiCache deployments as non-durable: supported node-based Valkey 9.0+ configurations can enable durability. Check the exact guarantees and recovery behavior, rather than equating replication or snapshots with zero data loss. For a rebuildable product cache, keep RDS or DynamoDB as the source of truth and evaluate ElastiCache first.
Plan access, failure and cost
Use private network access, narrowly scoped security groups, engine-supported authentication and TLS. Monitor memory, evictions, latency and connections; test cold-cache recovery. Compare serverless storage and processing dimensions with node-hours, backup and transfer dimensions where applicable; MemoryDB has its own pricing model. Check current regional rates and feature availability before provisioning. No deployment is required here. Practice: choose a cache for product cards and a durable store candidate for an ordered work queue; specify what to test on failure.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
ElastiCache and MemoryDB choices — knowledge check
Apply cache and database decisions to fictional workloads.
Which engine is a candidate for a sorted leaderboard?
Which client requirement applies to ElastiCache Serverless?
A team needs to evaluate a durable primary in-memory store. Which is designed for that purpose?
What is an important difference between node-based and serverless ElastiCache?
Which claim about ElastiCache durability is accurate?