ElastiCache Flashcards

1
Q

When do you use elasticache?

A
  • to reduce load on databases

- to make application stateless

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

Why do application need code changes when using cache?

A

Applications need to have a mechanism to query chache first and write to cache in case of a cache miss

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

What is elasticache?

A

a very fast in-memory store

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

What is he difference between redis and memcached?

A
  • redis replicates data across instances
  • memcached shards data across instances
  • better use redis due to backup and high availability features
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to secure elasticache?

A
  • elasticache does not support iam authentication
  • for redis you can ser a password/token
  • you can use security groups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are common patterns for elasticache?

A
  • Lazy Loading
  • Write Through
  • Session Store
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does lazy loading work and what is its disadvantage?

A

Application always reads cache first. If cache hits, use cache data. If cache miss read from database and write data to cache.

Data can become outdated in the cache as it is never updated.

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

How does the write through pattern for elasticache work?

A

Data is updated in the cache when written to the db.

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

How does the session store pattern for elasticache work?

A

Temporary session data is stored in the cache (using time to live).

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