ElastiCache with Redis

Learn about Redis and other ElasticCache features.

Redis

Let’s take a look at some Redis features.

  • The data is persistent.
  • It can be used as a datastore.
  • It is not multi-threaded.
  • It scales by adding shards, not nodes.
  • It supports automatic and manual snapshots (S3).
  • Backups include cluster data and metadata.
  • Multi-AZ is possible using Read Replicas in another AZ in the same region.

A Redis shard is a subset of the cluster’s keyspace that can include a primary node and zero or more Read Replicas.

Backups

You can restore your data by creating a new Redis cluster and populating it from a backup.

  • It supports master/slave replication.
  • Automated backups are enabled by default (automatically deleted with Redis deletion).
  • During backup, you cannot perform CLI or API operations on the cluster.

Watch out!

You can only move snapshots between regions by exporting them from Elasticache before moving between regions (can then populate a new cluster with data).

Clustering mode disabled

  • You can only have one shard.
  • One shard can have one read/write primary node and 0-5 read-only replicas.
  • You can distribute the replicas over multiple AZs in the same region.
  • Replication from the primary node is asynchronous.

A Redis cluster with cluster mode disabled is represented in the diagram below:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.