AWS ElastiCache Redis vs Memcached

AWS ElastiCache Redis vs Memcached

AWS ElastiCache – Valkey vs Redis OSS vs Memcached

🔄 Major Update (2024-2026): Valkey is Now the Recommended Engine

Amazon ElastiCache now supports Valkey as its primary recommended engine alongside Memcached and Redis OSS. Valkey is an open-source fork of Redis OSS 7.2 (BSD licensed), stewarded by the Linux Foundation. AWS recommends Valkey for new workloads due to better performance, lower cost (33% lower Serverless pricing, 20% lower node-based pricing), and active open-source development.

Key changes:

  • Redis OSS 7.2 is the last fully open-source version of Redis. Redis OSS on ElastiCache is now a maintenance track.
  • ElastiCache versions 4 and 5 for Redis OSS reached end of standard support on January 31, 2026. Extended Support available through January 31, 2029.
  • Redis 6 reaches End of Life on January 31, 2027. Migration to Valkey is strongly recommended.
  • ElastiCache Serverless (GA Nov 2023) provides zero infrastructure management with instant scaling.
  • Valkey 9.0 (May 2026) introduces full-text search, hybrid search, durability, and aggregation pipelines.

ElastiCache supports the Valkey, Memcached, and Redis OSS cache engines. Each engine provides some advantages.

AWS ElastiCache Valkey vs Redis OSS vs Memcached

Memcached

  • Need the simplest model possible.
  • Need to run large nodes with multiple cores or threads (multi-threaded architecture).
  • Need the ability to scale out and in, adding and removing nodes as demand on the system increases and decreases.
  • Need to cache objects.
  • Don’t need persistence, replication, or automatic failover.

Valkey (Recommended for New Workloads)

Valkey is a community-driven, open-source (BSD licensed) fork of Redis OSS 7.2, stewarded by the Linux Foundation and backed by AWS, Google, Microsoft, and others. It is a drop-in replacement for Redis OSS with significant performance and cost improvements.

  • Need complex data types, such as strings, hashes, lists, sets, sorted sets, and bitmaps.
  • Need to sort or rank in-memory datasets.
  • Need persistence of the key store.
  • Need to replicate the data from the primary to one or more read replicas for read-intensive applications.
  • Need automatic failover if the primary node fails.
  • Need publish and subscribe (pub/sub) capabilities — to inform clients about events on the server.
  • Need backup and restore capabilities.
  • Need to support multiple databases.
  • Need Encryption at Rest and in Transit.
  • Need the ability to dynamically add or remove shards from the cluster (cluster mode enabled).
  • Need to authenticate users with role-based access control (RBAC).
  • Need geospatial indexing (clustered mode or non-clustered mode).
  • Need to meet compliance requirements — HIPAA, FedRAMP, PCI-DSS.
  • Need vector search with microsecond latency and 95%+ recall rate (Valkey 8.2+).
  • Need built-in full-text search, aggregations, and hybrid search (Valkey 9.0+).
  • Need hash field expiration for per-field TTLs (Valkey 9.0+).
  • Need multi-database support in cluster mode (Valkey 9.0+).
  • Need Bloom filter support (Valkey 8.1+).
  • Need durability via Multi-AZ transactional log for zero data loss (Valkey 9.0+).
  • Need up to 20% better memory efficiency through embedded keys (Valkey 8.0+).
  • Need up to 270% higher throughput and 70% lower latency via I/O multithreading.

Redis OSS (Maintenance Track)

Redis OSS 7.2 is the last fully open-source version. AWS still supports existing Redis OSS workloads but recommends migrating to Valkey for active development and cost benefits. Upgrade from any Redis OSS version to Valkey is supported without downtime.

  • Need complex data types, such as strings, hashes, lists, sets, sorted sets, and bitmaps.
  • Need to sort or rank in-memory datasets.
  • Need persistence of the key store.
  • Need to replicate the data from the primary to one or more read replicas for read-intensive applications.
  • Need automatic failover if the primary node fails.
  • Need publish and subscribe (pub/sub) capabilities — to inform clients about events on the server.
  • Need backup and restore capabilities.
  • Need to support multiple databases.
  • Need Encryption at Rest and in Transit.
  • Need the ability to dynamically add or remove shards from the Redis (cluster mode enabled) cluster.
  • Need to authenticate users with role-based access control.
  • Need geospatial indexing (clustered mode or non-clustered mode).
  • Need to meet compliance requirements — HIPAA, FedRAMP, PCI-DSS.

ElastiCache Serverless

ElastiCache Serverless (GA November 2023) is a serverless option that eliminates the need for capacity planning and infrastructure management. It is available for Valkey, Memcached, and Redis OSS engines.

  • Zero infrastructure management — no nodes to provision, patch, or monitor.
  • Zero downtime maintenance — all updates applied automatically without disruption.
  • Instant scaling — automatically scales compute, memory, and network to meet demand.
  • Pay-per-use pricing — pay based on data stored and requests executed.
  • Create a cache in under a minute by just providing a name.
  • Scales to 5 million requests per second (RPS) per cache (Valkey 8.0+).
  • Supports IPv6 and dual-stack connectivity.
  • Multi-AZ by default with up to 99.99% availability SLA.
  • Supports backup and restore for Memcached serverless caches.

Valkey Version Highlights

Version Key Features
Valkey 9.0 (May 2026) Full-text search, hybrid search (text + vector), aggregation pipelines, hash field expiration, multi-database in cluster mode, polygon-based geospatial queries, 40% higher throughput with pipelining, durability via Multi-AZ transactional log
Valkey 8.2 Native vector search with microsecond latency and 95%+ recall rate
Valkey 8.1 (March 2025) Memory-efficient hash table (20% memory reduction), Bloom filters, COMMANDLOG, 514% higher BITCOUNT throughput
Valkey 8.0 (Nov 2024) 20% better memory efficiency, per-slot metrics, dual-channel replication, async I/O threading, Serverless scales to 5M RPS
Valkey 7.2 (Oct 2024) Initial Valkey release, drop-in replacement for Redis OSS 7.2, Functions, Sharded Pub/Sub, ACL improvements

Comparison Table: Valkey/Redis OSS vs Memcached

Feature Memcached Valkey / Redis OSS
Data types Simple (strings, objects) Complex (strings, hashes, lists, sets, sorted sets, bitmaps, HyperLogLog, geospatial, streams)
Multi-threaded Yes No (but I/O multithreading in Valkey)
Data partitioning Yes Yes (cluster mode)
Replication No Yes
Automatic failover No Yes
Pub/Sub No Yes
Backup & Restore Serverless only Yes
Encryption In-transit (1.6.12+) At-rest and in-transit
Geospatial indexing No Yes
Vector search No Yes (Valkey 8.2+)
Full-text search No Yes (Valkey 9.0+)
Durability No Yes (Valkey 9.0+ cluster mode)
Bloom filters No Yes (Valkey 8.1+)
Compliance (HIPAA, FedRAMP, PCI) Yes (1.6.12+) Yes

AWS Certification Exam Practice Questions

  • Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
  • AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
  • AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
  • Open to further feedback, discussion and correction.
  1. A company wants to implement best practices on AWS. Which implementation would help eliminate “Single Point of failure”?
    1. ElastiCache Memcached deployment
    2. RDS Single-AZ deployment
    3. EC2 instances on a single AZ
    4. ElastiCache Redis/Valkey deployment
  2. You are launching your first ElastiCache cache cluster, and start using Memcached. Which of the following is NOT a key feature of Memcached?
    1. You need the ability to scale your Cache horizontally as you grow.
    2. You use more advanced data types, such as lists, hashes, and sets.
    3. You need a simple caching model as possible.
    4. Object caching is your primary goal to offload your database.
  3. A development team is evaluating cache engines for a new application that requires vector similarity search for AI-powered recommendations. Which ElastiCache option would be MOST appropriate?
    1. ElastiCache for Memcached
    2. ElastiCache for Redis OSS 6.x
    3. ElastiCache for Valkey 8.2 or later
    4. ElastiCache for Redis OSS 7.0
  4. A company wants to deploy an in-memory cache with zero infrastructure management and automatic scaling. They do not want to provision or manage any nodes. Which ElastiCache deployment option should they choose?
    1. ElastiCache node-based cluster with Auto Scaling
    2. ElastiCache Serverless
    3. ElastiCache with CloudWatch alarms for manual scaling
    4. ElastiCache Global Datastore
  5. A company is running ElastiCache for Redis OSS version 5. They received a notification that standard support ends January 31, 2026. What is the recommended migration path?
    1. Upgrade to Redis OSS 7.2
    2. Migrate to ElastiCache for Valkey
    3. Move to Amazon MemoryDB
    4. Purchase Extended Support indefinitely
  6. Which of the following features is available ONLY with Valkey and NOT with Redis OSS on ElastiCache? (Select TWO)
    1. Pub/Sub messaging
    2. Built-in full-text search and hybrid search
    3. Geospatial indexing
    4. Bloom filter support
    5. Sorted sets

References