ElastiCache Flashcards

1
Q

What is ElastiCache?

A

Fully managed in-memory data store, compatible with Redis or Memcached

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

What are the main features of ElastiCache?

A

really high performance and sub-millisecond latency.

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

What does involve to use ElastiCache in your application?

A

heavy code changes

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

What must have ElastiCache to make sure only the most current data is used?

A

an invalidation strategy

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

How does work the mechanism among Applications - ElastiCache - RDS?

A

Applications queries ElastiCache, if not available, get from RDS and store in ElastiCache

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

What is a common use case for ElastiCache?

A

To save User Session Store

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

What is distinctive on ElastiCache Memcached?

A

sharding, non persistent, no backup and restore, multithreading

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

What is distinctive on ElastiCache Redis?

A

Multi AZ with failover, read replicas, data durability using AOF, backup and restore

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

How can you use IAM authentication for ElastiCache?

A

ElastiCache does not support it

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

In terms of security what does ElastiCache support?

A

SSL in flight encryption

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

How are IAM policies used on ElastiCache?

A

only for API-level security

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

What does Redis provide for extra security of ElastiCache?

A

Redis AUTH, a password/token when you create a Redis cluster on top of SGs

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

What does Memcached provide for extra security of ElastiCache?

A

Supports SASL-based authentication (advanced)

Simple Authentication and Security Layer

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

What are the patterns for ElastiCache?

A
  • Lazy Loading / Cache-Aside / Lazy Population
  • Write Through
  • Session Store
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is ElastiCache’s Lazy Loading / Cache-Aside / Lazy Population pattern?

A

It is the known pattern

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

What is ElastiCache’s Write Through pattern?

A

Adds or update data in the cache when written to a DB (no stale data)

17
Q

What is ElastiCache’s Session Store pattern?

A

store temporary session data in a cache (using TTL features)

18
Q

What are the pros of ElastiCache’s Lazy Loading / Cache-Aside / Lazy Population pattern?

A
  • Only requested data is cached (the cache isn’t filled up with unused data)
  • Node failures are not fatal (just increased latency to
    warm the cache)
19
Q

What are the cons of ElastiCache’s Lazy Loading / Cache-Aside / Lazy Population pattern?

A
  • Cache miss penalty that results in 3 round trips, noticeable delay for that request
  • Stale data: data can be updated in the database and outdated in the cache
20
Q

What are the pros of ElastiCache’s Write Through pattern?

A
  • Data in cache is never stale, reads are quick

- Write penalty vs Read penalty (each write requires 2 calls)

21
Q

What are the cons of ElastiCache’s Write Through pattern?

A
  • Missing Data until it is added / updated in the DB. Mitigation is to implement Lazy Loading strategy as well
  • Cache churn – a lot of the data will never be read
22
Q

How can occur ElastiCache’s Cache eviction?

A

In three ways:
• You delete the item explicitly in the cache
• Item is evicted because the memory is full and it’s not recently used (LRU)
• You set an item time-to-live (or TTL)

23
Q

For what kind of data are helpful ElastiCache’s TTL?

A

TTL are helpful for any kind of data:
• Leaderboards
• Comments
• Activity streams

24
Q

What to do if too many ElastiCache’s evictions happen due to memory

A

you should scale up or out

25
Q

What is the range of ElastiCache’s TTL?

A

TTL can range from few seconds to hours or days

26
Q

What ElastiCache pattern is easy to implement and works for many situations as a foundation, especially on the read side?

A

Lazy Loading / Cache aside

27
Q

With what is usually combined ElastiCache’s Write-through pattern?

A

with Lazy Loading as targeted for the queries or workloads that benefit from this optimization

28
Q

Setting a TTL is usually not a bad idea, except when…

A

you’re using Write-through. Set it to a sensible value for your application

29
Q

What is an anti-pattern for ElastiCache?

A

data changing rapidly, all large key space frequently needed