ElastiCache
💡 Definition
Amazon ElastiCache is a fully managed, in-memory caching service compatible with Redis and Memcached. It improves the performance of web applications by retrieving information from fast, managed in-memory caches instead of relying entirely on slower disk-based databases.
🔑 Key Concepts
- In-Memory Cache: Stores frequently accessed data in RAM, significantly reducing latency.
- Managed Service: AWS handles hardware provisioning, software patching, configuration, monitoring, and failure recovery.
- Redis: A fast, open-source, in-memory data store used as a database, cache, and message broker. Supports advanced data structures, replication, and persistence.
- Memcached: A simple, high-performance, distributed memory object caching system. Good for simple key-value data caching.
⚙️ How it Works
Your application queries ElastiCache first. If the data is in the cache (a "cache hit"), it's returned quickly. If not (a "cache miss"), the application retrieves the data from the underlying database (e.g., RDS, DynamoDB) and populates the cache for future requests.
🎯 Use Cases
- Session Management: Storing user session data for web applications.
- Leaderboards: Caching real-time game leaderboards.
- Frequently Accessed Data: Caching query results from databases to reduce load and improve response times.
💰 Pricing Model
- Node Hours: Charged based on the Instance Types of the cache nodes you run per hour.
- Data Transfer: Charges apply for data transfer in/out of ElastiCache.
📝 Exam Tips (CLF-C02)
- Remember ElastiCache = Caching.
- Improves application performance by reducing database load.
- Supports Redis and Memcached.
- A fully managed service.