ElastiCache Flashcards

1
Q

What is ElastiCache?

A

Managed Redis or Memcached

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

How do I enable ElastiCache for an existing application?

A

You need to make manual code changes, can’t just hit a button.

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

How does ElastiCache security work?

A

ElastiCache does not support IAM authenication, only security groups.

You have typical security features for Redis and Memcached:

  • In Redis you can use Redis AUTH (password/token)
  • In MemCached you can use something called SASL-based auth
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If you wanted to create a gaming leaderboard, what’s an easy way to do that?

A

“Sorted sets” in Redis.

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

How do backups work for ElastiCache?

A

In Redis, you can enable automatic backups or make them manually. The first one is free, the rest you need to pay for. You can also use AOF (append only file) for data durability.

Memcached is ephemeral, it’s not designed for backups.

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

What’s a common use case for ElastiCache?

A

Storing session data (since that’s ephemeral)

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

How does cache invalidation work in ElastiCache?

A

You need to implement it yourself. Typical strategies: lazy loading, write-through, having a TTL. You’ll usually want some combination of those.

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

How does HA work for ElastiCache?

A

You can run run Redis as a cluster: multi-AZ with automatic failover.

Memcached has no real HA unless you want to do sharding.

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