Which service is BEST suited when you want to cache the results of repeated read queries to a database in memory, speed up responses, and reduce the load on the database?

1 / 1
Select an answer
CorrectA

Explanation

A question about choosing the service that speeds up responses with an in-memory cache.

  • 1cache the results of repeated read queries to a database in memoryIn-memory cache = ElastiCache
  • 2speed up responsesSub-millisecond low-latency responses
  • 3reduce the load on the databaseReduce repeated queries
ACorrect

Amazon ElastiCache

Correct. Amazon ElastiCache is an in-memory cache service that provides Redis or Memcached. By caching frequently accessed data in memory, it speeds up responses to sub-millisecond latency and reduces repeated queries to the backing database, lowering its load.

BIncorrect

Amazon CloudFront

Amazon CloudFront is a CDN that caches and delivers static and dynamic content at edge locations.

Caching is a shared concept, but its target is content delivered to users, and it is not a layer that caches database query results in memory, so it is incorrect.

CIncorrect

Amazon RDS read replica

A read replica is a mechanism that creates a copy of the database and distributes read requests, and it is effective at reducing read load.

However, it is in fact a disk-based database, and ElastiCache is the right fit for this requirement of speeding up responses with an in-memory cache, so it is incorrect.

DIncorrect

Amazon DynamoDB

Amazon DynamoDB is a fully managed key-value/document NoSQL database.

It is fast, but it is itself a persistent database, and it is not an in-memory cache layer placed in front of an existing database, so it is incorrect.

Key Takeaway

'In-memory', 'cache', and 'reduce DB load / speed up' point to Amazon ElastiCache (Redis/Memcached). Distinguish it from read replicas (disk-based copies for read distribution) and CloudFront (edge cache for content delivery) by 'what is cached where'.