Elasticache Flashcards

1
Q

What is Elasticache?

A

Web service that acts as an in memory cache in the cloud. Improves performance of web apps and latency and throughput for ready heavy apps.

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

What are the 2 open source in memory caching engines used by Elasticache?

A

Memcached

Redis

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

Describe Memcached

A

ElasticCache Widely adopted

Not persistent (pool can grow or shrink)

Multi-threaded

No Multi-AZ

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

What is a use case of memcached?

A

Object caching

Want a simple caching model

Need multi-threaded performance (large cache loads)

Scale Horizontally

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

Describe Redis

A

ElasticCache

Popular open source key value store

Multi-AZ supported

Managed like Relational Databases

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

What are use cases for Redis?

A

Need to cach advanced data types (lists, hashes, sets)

Sorting and ranking datasets in memory (leadership)

Need persistence of key store

Need to run in Multi-AZ zones

Management keeps running OLAP transactions data warehousing

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

What are the two caching strategies of Elasticache?

A

Lazy Loading

WriteThrough

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

Describe Lazy Loading

A

Caches only when necessary. If the item is not in the cache and return null goes and gets the item from the DB.

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

Advantages and Disadvantages of Lazy Loading

A

Advantages

  • Only requested data is cached
  • Node failure is not a problem

Disadvantage

  • Cache miss penalty
  • Initial request -> query to database -> write to cache
  • Data can become stale (only update on cache miss)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe WriteThrough caching

A

Add or update data in a cache when anything is written to the database

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

Advantages and Disadvantages of WriteThrough caching

A

Advantages

  • data is never stale
  • more tolerant of additional latency

Disadvantage

  • Write penalty (every write involves wrtie to db)
  • If node fails. Have to midigate by implementing lazy loading in conjunction with writeThrough.
  • Wasted resources if mos of data is never read
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When to use elasticache for Dynamo

A

If need lazy loading

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

When a data set is under a lot of stress what can you use to elevate some of the stress?

A

Elasticache

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