Bitzu

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

Single choice

Which AWS service provides a managed in-memory cache that can sit in front of a relational database to speed up repeated reads?

  1. Amazon CloudFront
  2. Amazon ElastiCache
  3. Amazon S3
  4. 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.

Select all that apply

Which are common use cases for Amazon ElastiCache?

  1. Caching the results of slow database queries
  2. Archiving compliance records for ten years at low cost
  3. Storing web session state for logged-in users
  4. Maintaining a real-time top-10 game leaderboard
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More CLF-C02 topics in this module