CLF-C02 ยท Database services
Amazon ElastiCache: in-memory caching
Amazon ElastiCache as an in-memory cache and data store, caching use cases (sessions, leaderboards, query results) and supported engines.
Key points
- Amazon ElastiCache: managed in-memory data store and cache; engines Valkey, Memcached, Redis OSS.
- Serverless: no nodes to size, scales automatically. Node-based: you choose type and count.
- AWS handles hardware, monitoring, node replacement, patching.
- Uses: slow query results, session state, real-time leaderboards (sorted sets).
- Cache data read often and changed rarely; it may be stale.
- For DynamoDB: DAX.
Source: https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/WhatIs.html
Practice questions
Which AWS service provides a managed in-memory cache that can sit in front of a relational database to speed up repeated reads?
- Amazon CloudFront
- Amazon ElastiCache
- Amazon S3
- Amazon Redshift
Show answer
Answer: B. Amazon ElastiCache
Amazon ElastiCache is the managed in-memory cache and data store. CloudFront caches web content at edge locations, S3 is object storage, and Redshift is a data warehouse.
Which are common use cases for Amazon ElastiCache?
- Caching the results of slow database queries
- Archiving compliance records for ten years at low cost
- Storing web session state for logged-in users
- Maintaining a real-time top-10 game leaderboard
- Running petabyte-scale BI reports over historical data
Show answer
Answer: A. Caching the results of slow database queries, C. Storing web session state for logged-in users, D. Maintaining a real-time top-10 game leaderboard
ElastiCache is used for caching expensive query results, storing user session state and building real-time leaderboards with sorted sets. Long-term archival and a petabyte analytics warehouse fit S3 Glacier and Redshift instead.
Caching gives the biggest benefit for data that changes constantly and is rarely read.
Show answer
Answer: False
False. Caching pays off for data that is read often and stays relatively unchanged (or where some staleness is acceptable). Data that changes constantly or is seldom read gains little from a cache.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
