ElastiCache
Definition
AWS in-memory caching service for improving application performance. Like having a high-speed memory bank that stores frequently accessed data.
Use Cases
- Pinterest: Reducing latency and database load for high-traffic user-facing features by caching frequently accessed data. — Pinterest has publicly discussed using Redis as a caching layer in their architecture. In AWS, a common managed approach is running Redis via Amazon ElastiCache to store hot keys (e.g., precomputed feed components, user/session-related lookups) with TTLs and cache-aside patterns. (Lower read latency for frequently requested data and reduced pressure on primary databases, improving responsiveness during traffic spikes.)
- Airbnb: Caching to speed up reads for frequently accessed application data and reduce load on backing datastores. — Airbnb has publicly shared using Redis in production for caching and other real-time use cases. In an AWS deployment, teams commonly use Amazon ElastiCache for Redis to manage patching, failover, and scaling while applications use cache-aside and TTL-based invalidation. (Faster response times for read-heavy endpoints and improved system stability by offloading repetitive reads from databases.)
- Stack Overflow: Serving pages faster by caching frequently requested content and reducing database queries. — Stack Overflow has publicly discussed using Redis for caching. In AWS, this is often implemented with Amazon ElastiCache for Redis as a shared cache tier, with careful key design, TTLs, and cache invalidation strategies for dynamic content. (Reduced database load and improved page performance for high-traffic content.)
Provider Equivalents
- AWS: Amazon ElastiCache
- Azure: Azure Cache for Redis
- GCP: Memorystore
- OCI: OCI Cache with Redis
Frequently Asked Questions
- What's the difference between ElastiCache and Amazon RDS?
- Amazon RDS is a managed relational database that stores your system of record (durable data). ElastiCache is an in-memory cache designed for speed, not long-term storage. You typically keep authoritative data in RDS (or another database) and use ElastiCache to store frequently accessed or expensive-to-compute results to reduce latency and database load.
- When should I use ElastiCache?
- Use ElastiCache when you have read-heavy workloads, repeated queries, or expensive computations and you need lower latency than a database can provide. Common triggers include: slow database reads under load, frequent access to the same objects (product details, user profiles), session or shopping cart storage, rate limiting, leaderboards, and caching API responses. If your data must always be strongly consistent and durable, keep it in a database and use ElastiCache as a performance layer.
- How much does ElastiCache cost?
- ElastiCache pricing depends mainly on the node type (CPU/memory), number of nodes, engine (Redis or Memcached), region, and whether you use features like Multi-AZ, backups/snapshots (Redis), and data transfer. Costs typically scale with memory size and high availability requirements. For accurate estimates, use the AWS Pricing Calculator and consider peak memory needs, replication/failover, and expected network traffic.
Category: data
Difficulty: intermediate
Related Terms
See Also