ELasticcache is a web services that makes it easy to deploy. operate and Scale an in-memory cache in the cloud. The serices improves the performance of the web applications by allowing you to retrieve information from fast, managed, in-memory caches, instead of relying entirely on slower disk-based databases.

improves application performance by storing critical pieces of data in memory for low-latency access. The cached information may include the results fo I/O-intensive database queries or the result of computationally-intensive calculations

Types of ElastiCache

Memcached:

A widely Adopted Memory object caching system. ElastiCache is protocol compliant with Memcached, so popular tools that you use today with existing Memcached

Redis:

A popular open-source in-memory key-value store that support data structures such as sorted sets and lists. ElastiCache supports Master / Slave replication and Multi-AZ which can be used to achieve cross AZ redudancy.

Although, Both Memcahced and redis appear similar on the surface (in that they are both in-memory key stores), they are actually quite differen in practice. Because of replicationa dn presistence features of Redis, ElasticCache manages redis more as a relationa database. Redis ElastiCache clusters are managed as stateful enetities that include failover, similar to how amazon RDS manages database failover

Memached

Because Memcached is designed as a pure caching solution with no presistence, ElastiCache manages Memcahced nodes as a pool that can grow and shrink, similar to an amazon EC2 Auto Scaling Group. Individual nodes are expendable, and ElasticCache provides additional capabilities here, such as automatic node replacement and Auto Discovery.

Memcached – use Cases

  1. Is object caching your primary goal, for examples offload your database? if so, use Memcached.
  2. Are you intrested in as simple a caching models as possible?
    if so, use Memcahced
    Are you planning on running large cache nodes, and require multithreaded performance with utiliztion of multiple cores? if so, use Memcached.
    4.Do you want the ability to scale your cache horizontally as you grow ? if so, use MemcacheD

Redis – Use Cases

  1. Are you looking for more advanced data types, such as lists, hashes and sets? if so use redis
  2. Does Sorintg and ranking datasets in memory help you, such as with leaderboards, if so, use Redis
  3. Is presistenece of your key store imporatn? if so, use Redis
  4. Do you want to run in mulitple AWS Availability Zones (Multi-AZ) with failover ? if so use Redis.
  1. Are you looking for more advanced data types, such as lists, hashes and sets? if so use redis
  2. Does Sorintg and ranking datasets in memory help you, such as with leaderboards, if so, use Redis
  3. Is presistenece of your key store imporatn? if so, use Redis
  4. Do you want to run in mulitple AWS Availability Zones (Multi-AZ) with failover ? if so use Redis.