ElastiCache Flashcards

This deck aims to help retain concepts related to the AWS ElastiCache service. (19 cards)

1
Q

Which AWS service offers a fully managed, in-memory caching solution that improves application performance by storing frequently accessed data in memory, enabling low-latency, high-throughput access compared to traditional databases?

A

ElastiCache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What feature of AWS ElastiCache used to define common values across the nodes for memory usage and item sizes?

A

Parameter Groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What cache engines are supported by AWS ElastiCache?

A
  • Redis
  • Memcached
  • Valkey (recently added as a Redis-compatible engine)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are key considerations when using AWS ElastiCache to improve performance?

A
  • Reduces database workload and cost
  • Requires application changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the primary use cases of AWS ElastiCache?

A
  • Caching data for read-heavy, low-latency workloads
  • Storing session data for stateless servers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What features characterize the AWS ElastiCache Memcached engine?

A
  • Simple string-only data structures
  • No replication or backup support
  • Multi-threaded design for multi-core CPUs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What features characterize the AWS ElastiCache Redis engine?

A
  • Supports advanced data structures (lists, sets, sorted sets, hashes, bitmaps, and more)
  • Supports replication (Multi-AZ)
  • Supports backup and restore
  • Supports transactions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What distribution strategy used by distributed caching systems like Memcached minimizes cache invalidations when nodes are added or removed?

A

Consistent hashing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What AWS ElastiCache caching strategy involves checking the cache first, and if the data is missing or expired, fetching it from the data store, storing it in the cache, and returning it to the application?

A

Lazy loading caching strategy (also known as Cache-aside)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the advantages of the Lazy loading caching strategy with AWS ElastiCache?

A
  • Caches only requested data, optimizing memory usage
  • Prevents unnecessary data from occupying cache space
  • Resilient to node failures as application continues to function with higher latency until the cache repopulates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the disadvantages of the Lazy loading caching strategy with AWS ElastiCache?

A
  • Cache miss penalty: initial requests for uncached data are slower due to retrieval from the database
  • Stale data: cache may serve outdated data since it doesn’t automatically update when the data in database changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What AWS ElasticCache caching strategy adds or updates data in the cache whenever data is written to the database, ensuring that the cache always contains the most up-to-date version of the data as it is written to the database?

A

Write-through cachign strategy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of the Write-through caching strategy with AWS ElasticCache?

A
  • Data in the cache is never stale: cache is always up-to-date
  • Write penalty vs. read penalty: users are generally more tolerant of latency during data updates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the disadvantages of the Write-through caching strategy with AWS ElasticCache?

A
  • Missing data: new nodes may have missing data until it is added or updated in the database
  • Cache churn: a lot of data may never be read, leading to wasted resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does adding a Time to Live (TTL) value improve caching strategies like lazy loading and write-through with AWS ElastiCache?

A
  • Avoiding stale data: TTL ensures that data isn’t kept in the cache forever
  • Preventing cache clutter: with TTL, only relevant data is kept in the cache
  • Handling missing data: if a cache key expires, it’s treated as a cache miss
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which AWS ElastiCache caching strategy should be used for applications that prioritize controlling cache size and cost?

A

Lazy-loading (Cache-aside) caching strategy

17
Q

Which AWS ElastiCache caching strategy should be used for applications that prioritize performance and data consistency?

A

Write-through caching strategy

18
Q

Can an AWS ElastiCache for Redis cluster span multiple AWS regions?

A

No, nodes in the cluster must reside in the same region

19
Q

What are the limitations of using AWS ElastiCache for Redis with cluster mode enabled?

A
  • Manual promotion of replica nodes to primary is not supported
  • Multi-AZ deployment is mandatory
  • Cluster modifications (node type, number of nodes, or structure) require restoring from a backup