Amazon ElastiCache
View on GitHubAmazon ElastiCache
Amazon ElastiCache is a managed in-memory data store and caching service that supports Redis and Memcached engines. It provisions and operates cache clusters or replication groups inside a customer VPC to provide low-latency, in-memory key-value storage. It normally fits between application servers and primary data stores to reduce read latency and offload backend databases.
🗂 Resource Category
Database
🧠 Exam Memory Hook
Think: "Low-latency in-memory cache between app and primary datastore = Amazon ElastiCache"
📖 Ownership
Classification: AWS Managed Service
AWS responsibilities: AWS operates and manages the underlying service platform, the physical infrastructure, host operating system, hypervisor, and the managed cache engine runtime (ElastiCache control plane and host-level software). AWS is responsible for the availability of the managed control plane, provisioning of nodes, and maintenance of the underlying infrastructure and managed service components.
Customer responsibilities: The customer configures engine parameters, parameter groups, security groups, subnet groups, access control, data, snapshots, maintenance windows, and scaling behaviour; secures access using VPC networking, IAM, and encryption settings where supported; and monitors cache metrics, logs, and application usage patterns. Customers are responsible for data design, TTL policies, backup retention choices, and application-level caching logic and consistency.
Patching responsibilities: AWS patches and maintains the physical infrastructure, hypervisor, host operating system, and the managed cache engine platform and offers engine version upgrades and maintenance windows for Redis and Memcached. The customer is responsible for patching and maintaining their applications, application libraries and dependencies, and any software running outside of the managed ElastiCache nodes.
🏗 Typical Architecture
💡 Top 5 Features
- Managed support for Redis and Memcached cache engines with control-plane operations.
- In-memory key-value storage for low-latency data access and TTL-based eviction.
- Replication groups and Multi-AZ failover support for Redis when configured for high availability.
- Snapshot and restore capability for Redis to create on-demand or scheduled backups.
- Engine parameter groups and node management for configuration and scaling of clusters.
✅ Top 5 Use Cases
- Caching frequently read database query results to reduce load on relational or NoSQL databases.
- Storing session state or user metadata for low-latency session management across application servers.
- Using Redis data structures (sorted sets, hashes) for leaderboards, counters, and real-time analytics.
- Implementing read-through or write-through caches to accelerate microservices that require sub-millisecond reads.
- Offloading repetitive computations and API response caching to reduce backend compute and database cost.
🏗 Architecture Placement
Amazon ElastiCache is deployed inside a customer VPC and typically sits between application servers and primary persistent datastores; application servers send reads and writes to the cache and fall back to the primary datastore on cache miss. It connects to application compute (EC2, ECS, Lambda via VPC) and is monitored via CloudWatch; placement and visibility are regional and VPC-scoped. Depending on the engine and configuration, ElastiCache may operate as a clustered or replication-group deployment for Redis.
🎯 Commonly Used With
- Amazon EC2
- Amazon VPC
- Amazon CloudWatch
- AWS Identity and Access Management
- Amazon RDS
🌍 5 Real-World Examples
- A retail application caches product catalog lookups in ElastiCache to reduce database read traffic during peak shopping periods, improving request latency for product pages.
- A gaming backend uses Redis in ElastiCache to store real-time leaderboard scores and session tokens to deliver low-latency gameplay experiences.
- A media streaming service caches user playback metadata and recommendations in ElastiCache to accelerate personalization queries from microservices.
- A financial services portal stores ephemeral user session state and short-lived calculation results in ElastiCache to reduce load on transactional databases.
- A healthcare web application caches frequently accessed reference data to reduce repeated queries against regulatory or clinical databases and improve response times.
🎓 AWS Exam Clues
- Choose ElastiCache when the requirement is low-latency, in-memory key-value access between application and primary datastore.
- Select Redis on ElastiCache when advanced data structures, persistence snapshots, or pub/sub semantics are required.
- Consider Memcached on ElastiCache for simple, horizontally scalable caching without persistence or advanced Redis features.
- Plan for VPC placement, security groups, and subnet groups because ElastiCache clusters are deployed inside customer VPCs.
- High availability requires using Redis replication groups and configured failover; single-node Memcached deployments do not provide the same HA model.
📝 Quick Revision
Amazon ElastiCache is a managed in-memory caching service for Redis and Memcached used to reduce read latency and database load. Use it when microsecond-to-millisecond access and data-structure capabilities are required; consider persistence, failover configuration, security groups, and monitoring when designing production deployments.
🏷 Keywords
Redis • Memcached • in-memory cache • replication group • cluster mode • snapshots • Multi-AZ failover • parameter group • node type • TTL eviction • VPC subnet group • CloudWatch metrics