AWS ElastiCache : AWS Redis Cache and Memcached cache

Rashmi Bhardwaj | Blog,Cloud & Virtualization
Advertisements

AWS ElastiCache : AWS Redis Cache and Memcached cache

AWS ElastiCache :

AWS Redis Cache and Memcached cache

Caching, as we all know is a technique of storing the frequently accessed data at a temporary location on the server, which, if not accessed for a given amount of time is then lost.

AWS ElastiCache is caching service available on AWS Cloud. Amazon ElastiCache improves the performance of web applications by allowing you to retrieve information from a fast, managed, in-memory system, instead of relying entirely on slower disk-based databases. It provides a high-performance, scalable, and cost-effective caching solution with lower complexity as compared to deploying a distributed caching solution.

Few of the Benefits Associated with ElastiCache:

  • AWS ElastiCache Supports Clustered Configurations, hence it can automatically detects and replaces the failed nodes, providing a resilient system that mitigates the risk of overloaded databases, which slow website and application load times.
  • AWS ElastiCache can be integrated with the AWS Cloud Watch service that will further help to monitor the key performance metrics on your EC2 nodes.
  • Flexible Availability Zone placement of nodes and clusters.
  • Amazon ElastiCache can scale easily to meet fluctuating application demands.

Related – Launching AWS EC2 Instance

Advertisements

Amazon ElastiCache Offers two caching Engines:

  • Memcached
  • Redis

Before we dive into details of the Caching engines, we must be aware of the two terminologies as below:

ElastiCache nodes are a building blocks of AWS ElastiCache which are nothing but network attached RAM with each node having its own DNS name and port.

ElastiCache Cluster is a grouping of ElastiCache Nodes.

Next, let us dive into the details of the two caching engines.

AWS Memcached Cache

If an ElastiCache Cluster comprises of memcached nodes, then the nodes can be spread across different availability zones to achieve high-availability.

Memcached supports up to 100 nodes per customer for each AWS Region with each cluster having 1–20 nodes. You partition your data across the nodes in a Memcached cluster.The latest version of Memcached supported in ElastiCache is 1.4.24.  A Memcached cluster has multiple nodes whose cached data is horizontally partitioned across each node. Each of the nodes in the cluster is capable of read and write.

Each node in a Memcached cluster has its own endpoint. The cluster also has an endpoint called the configuration endpoint. If you enable Auto Discovery and connect to the configuration endpoint, your application automatically knows each node endpoint, even after adding or removing nodes from the cluster.

Following are the few cases where we would consider using Memcached Engine:

  • Need the simplest data model possible to store Key-Value pairs.
  • Need to run large nodes with multiple cores or threads
  • Need the ability to scale out and in, adding and removing nodes as demand on your system increases and decreases.
  • Need to cache objects, such as a database.

 

AWS Redis Cache

AWS Redis Cache is a newer technology of ElastiCache and often considered as a superset of Memcached. That means AWS Redis Cache offers more and performs better than Memcached. Amazon ElastiCache supports Redis 2.8.23 and lower. Redis-2.8.6 and higher is a significant step up because a Redis cluster on version 2.8.6 or higher will have Multi-AZ enabled. Upgrading is a non-disruptive process and the cache data is retained.

A Redis cluster has only one node, which is the master node. Redis clusters do not support data partitioning. Rather, there are up to five replication nodes in-replication groups which are read-only. They maintain copies from the master node which is the only writeable node. The data are copied asynchronously to the read-replicas, and read requests are spread across read-replica clusters. Having multiple read replicas in different AZs enables high availability.

Redis cluster supports backup and restore processes. It is useful when you want to create a new cluster from existing cluster data.

Following are the few cases where we would consider using AWS Redis Cache Engine:

  • Need to store complex data types, such as strings, hashes, lists, sets, sorted sets, and bitmaps.
  • Need to sort or rank in-memory datasets.
  • Need persistence of your key store.
  • Need to replicate your data from the primary to one or more read replicas for read intensive applications
  • Need automatic failover if your primary node fails.
  • Need automatic failover if your primary node fails.
  • Need backup and restore capabilities.
  • Need to support multiple databases.

Conclusion

AWS ElastiCache is a caching solution which renders high performance, gives scalability, and is very cost-effective. The two flavors of elasticache are Memcached and Redis.

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart