Skip to content


General Info

  • Service that simplifies the setup and management of distributed IN-MEMORY caching environments
  • Pay
    • Provisioned compute resources
    • Storage (charged according to compute resources)

Cache Engines

Engine Description
  • Allows to R/W objects into IN-MEMORY key/value data stores
  • Can elastically grow/shrink a cluster of nodes
  • Can PARTITION cluster into shards → parallel operations
  • OBJECT = BLOB (serialised results from a DB query) retrieved with a unique key
  • OBJECT support + data types (string, list, set)
  • Can PERSIST in-memory data onto disk → allows to create snapshots that back up data & then recover/replicate from backups
  • Can SORT and RANK data
  • Can leverage PUB/SUB messaging abstraction


Node Types
  • Derived from subset of EC2 instance type
  • T2 = development & occasional bursts
  • M3 = good mix
  • T3 = memory-intensive workloads
  • For MEMCACHED clusters partitioned across multiple nodes
  • Gives apps the ability to identify automatically all nodes in the cluster
  • Works with scaling


    • Add more nodes
    • <= 20 nodes in a cluster
    • 1! node but 1+ clusters can be grouped into a REPLICATION GROUP
    • 1! node handling W commands
    • <= 5 READ REPLICAS handling R-only requests
  • You can't change node type
  • You can spin up a new cluster with desired node type & redirect traffic to new cluster
  • State at startup
    • MEMCACHED = always starts empty
    • REDIS = can be initialised from backup
  • Performed asynchronously
  • Goals
    • Rapid recovery of node failure
    • Serve high volumes of reads
    • Standalone in-memory services
    • No redundant data protection services
    • Supports both goals with replication groups
    • Multi-AZ Replication Groups
      • Allow to increase availability and minimise loss of data
      • Failure of primary node → read replica promoted to new primary + new node provisioned to replace the failed one + update DNS of new primary
    • Snapshots cannot be created
    • Allows to persist data on disk & to create a snapshot
    • SNAPSHOT = full clone of the data, stored in S3
    • AUTOMATIC = setup a replication group & perform snapshot against a read replica
    • MANUAL = stored indefinitely until you delete them


Access Control
  1. Restrict INBOUND network access
    • Using SGs
      • Control network access to cache cluster
      • By default network access is off
      • For apps to access the cluster → explicitly enable access in specific EC2 SG
    • When deployed in a VPC, each node will be issued a private IP address
    • Nodes can never be accessed from the Internet or from EC2 outside the VPC
  2. Further restrict at the SUBNET LEVEL via ACLs
  3. Access to manage the config of the cluster is controlled separately (via IAM) from access to the actual memcached/redis service endpoint