{"id":75404,"date":"2020-06-19T12:32:25","date_gmt":"2020-06-19T12:32:25","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=75404"},"modified":"2020-08-31T11:28:00","modified_gmt":"2020-08-31T11:28:00","slug":"aws-elasticache-for-redis","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/","title":{"rendered":"AWS ElastiCache for Redis as Application Cache"},"content":{"rendered":"<p id=\"bfa7\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">In the modern <a href=\"https:\/\/www.whizlabs.com\/blog\/cloud-computing\/\" target=\"_blank\" rel=\"noopener noreferrer\">cloud computing<\/a> world, most applications use caching to reduce latency and improve performance for read-heavy workloads. In any application, caching plays an important role and can be applied to various layers such as database, UI layer (Session Management), file system, and operating system.<\/p>\n<p class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">While implementing caching, it is important to understand whether or not caching particular data will improve performance and reduce load. Issues related to JVM in-memory cache, when used in monolithic applications, are well documented. Since most modern applications are moving toward microservices, a third-party caching service, which will be a good fit with a microservice application, is needed.<\/p>\n<blockquote>\n<p data-selectable-paragraph=\"\">Preparing for an AWS certification? Check out our\u00a0<a href=\"https:\/\/www.whizlabs.com\/aws-certifications\/\" target=\"_blank\" rel=\"noopener follow noreferrer\" data-wpel-link=\"internal\">AWS certification training courses<\/a>!<\/p>\n<\/blockquote>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/#Traditional_In-memory_Cache\" >Traditional In-memory Cache<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/#New_Technologies\" >New Technologies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/#Key_Features_of_the_Caching_Solution\" >Key Features of the Caching Solution<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/#Introduction_to_AWS_ElastiCache_for_Redis\" >Introduction to AWS ElastiCache for Redis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/aws-elasticache-for-redis\/#Final_Words\" >Final Words<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 id=\"d5c1\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\"><span class=\"ez-toc-section\" id=\"Traditional_In-memory_Cache\"><\/span>Traditional In-memory Cache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"db95\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">In-memory data caching reduces round trips to a remote server or database. It improves application performance and speeds up response time. It also has a couple of drawbacks, particularly in a microservices architecture. If an organization has multiple microservices sharing the same key\/value data, the same data must be cached across the microservices.<\/p>\n<figure class=\"gv gw gx gy gz ha cn co paragraph-image\" style=\"text-align: justify;\">\n<div class=\"cn co gu\">\n<div class=\"hg r hh hi\">\n<div class=\"hj hk r\">\n<div class=\"hb hc s t u hd ai av he hf\">\u00a0<img decoding=\"async\" class=\"aligncenter wp-image-75423 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-cache.png\" alt=\"in-memory cache\" width=\"612\" height=\"525\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-cache.png 612w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-cache-300x257.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-cache-490x420.png 490w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"a08f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">With the in-memory cache, the same code must be duplicated across the microservices to cache the data. Creating, updating, or deleting data in the cache of an application running across multiple nodes requires refreshing or restarting all the nodes to reflect the changes.<\/p>\n<p class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">If the application is using in-memory cache and the data is huge, it will slow down and could possibly suffer from long garbage-collection halts. In-memory cache code is tightly coupled with application code and is not easily reusable for other components. Developers face challenges in rewriting code for each component that shares the same cached data.<\/p>\n<figure class=\"gv gw gx gy gz ha cn co paragraph-image\" style=\"text-align: justify;\">\n<div class=\"cn co hp\">\n<div class=\"hg r hh hi\">\n<div class=\"hq hk r\">\n<div class=\"hb hc s t u hd ai av he hf\"><img decoding=\"async\" class=\"aligncenter wp-image-75424 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-caching.png\" alt=\"in-memory cache\" width=\"303\" height=\"325\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-caching.png 303w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/in-memory-caching-280x300.png 280w\" sizes=\"(max-width: 303px) 100vw, 303px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<h3 id=\"5353\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\"><span class=\"ez-toc-section\" id=\"New_Technologies\"><\/span>New Technologies<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"c9bc\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">Forward-thinking application development organizations in the IT industry have been making waves in moving from monolithic applications to microservices. The key characteristic of a microservices architecture is that each individual service is decoupled from other services and each acts as an independent entity.<\/p>\n<p class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">Caching is a mandatory requirement for building scalable microservices applications. Industries are moving towards deploying microservice applications in the cloud, creating a need for cloud-based services that support distributed cache and are decoupled from application code. <a href=\"https:\/\/aws.amazon.com\/elasticache\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon ElastiCache<\/a> is a fully managed data store of Amazon Web Services that offers two: Redis and Memcached, in-memory data stores that can be used as cache.<\/p>\n<h3 id=\"38a6\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\"><span class=\"ez-toc-section\" id=\"Key_Features_of_the_Caching_Solution\"><\/span>Key Features of the Caching Solution<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"17a0\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">The caching solution must have the following :<\/p>\n<ul>\n<li id=\"7929\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Integrates easily with application code<\/li>\n<li id=\"3163\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Requires minimal APIs<\/li>\n<li id=\"53e7\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Supports distributed cache for a clustered environment<\/li>\n<li id=\"e7a3\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Supports sharing of the objects across the JVM (in java applications)<\/li>\n<li id=\"97c6\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Is scalable<\/li>\n<li id=\"45fc\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Is easy to maintain<\/li>\n<li id=\"806f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Supports various data structures<\/li>\n<li id=\"3efa\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Supports persisting data to disk if required<\/li>\n<li id=\"0695\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Reduces the load on the back end<\/li>\n<li id=\"7862\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Enables prediction of the performance of the application based on load<\/li>\n<li id=\"06b8\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Reduces database load and cost<\/li>\n<li id=\"46d5\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Supports storage of key\/value pairs<\/li>\n<\/ul>\n<p id=\"8348\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">In-memory cache stores data in key\/value format and supports any data structure such as strings, hashes, lists and sets, so a successfully distributed cloud cache service replacement must also store data in key\/value format and support any data structure. AWS ElastiCache for Redis meets all the requirements to replace in-memory cache, while Memcached, intended for simpler applications, does not.<\/p>\n<h3 id=\"6ac9\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\"><span class=\"ez-toc-section\" id=\"Introduction_to_AWS_ElastiCache_for_Redis\"><\/span>Introduction to AWS ElastiCache for Redis<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"ab66\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\"><a href=\"https:\/\/aws.amazon.com\/redis\/\" target=\"_blank\" rel=\"noopener noreferrer\">Redis<\/a> is a great choice to implement a distributed cache that stores and supports flexible data structures in key\/value format. Typically, it is an external service, so many microservices applications or monolithic applications can share the same cache or same cluster.<\/p>\n<p class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">Since it is an external service, it enables scaling for the higher load without impacting or making changes to the application code. Use of Redis cache provides efficient application performance for read and write operations.<\/p>\n<p id=\"26f0\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">Today, most web applications are built on restful web API over HTTP, which requires a low latency response from the back end. Database caching in AWS ElastiCache for Redis allows a dramatic increase of throughput and reduced data retrieval latency.<\/p>\n<p id=\"0694\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">In the Web application UI layer, a user\u2019s session data can be cached, speeding up the exchange between the user and the web application.<\/p>\n<p id=\"c40f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">AWS ElastiCache for Redis is developer-friendly and supports most programming languages \u2014 C, C#, Java, Go, Python, PHP, and nearly all popular languages.<\/p>\n<figure class=\"gv gw gx gy gz ha cn co paragraph-image\" style=\"text-align: justify;\">\n<div class=\"cn co hu\">\n<div class=\"hg r hh hi\">\n<div class=\"hv hk r\">\n<div class=\"hb hc s t u hd ai av he hf\"><img decoding=\"async\" class=\"aligncenter wp-image-75425 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-1.png\" alt=\"AWS ElastiCache for Redis\" width=\"510\" height=\"464\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-1.png 510w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-1-300x273.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-1-462x420.png 462w\" sizes=\"(max-width: 510px) 100vw, 510px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<h4 id=\"e60f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\">Why Use AWS Redis Cache?<\/h4>\n<p id=\"c0d5\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">AWS ElastiCache for Redis has some useful properties, as below:<\/p>\n<ul>\n<li id=\"7271\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis is a clustered cache. It can be shared and accessed by multiple applications or multiple microservices, avoiding duplication of the same cache in each application.<\/li>\n<li id=\"4576\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">It can persist the data to the disk of the application if desired.<\/li>\n<li id=\"dc9d\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis supports various data structures.<\/li>\n<li id=\"d18b\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis is a NoSQL database<\/li>\n<li id=\"306d\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">It can be highly available because it replicates its activity between master\/slave nodes.<\/li>\n<li id=\"a01f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis can eliminate garbage collection halt.<\/li>\n<li id=\"d22f\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">It supports the distribution of data using a Publish\/Subscribe paradigm.<\/li>\n<li id=\"9753\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis supports Session Store; a session-oriented application can store the user session in the cache.<\/li>\n<\/ul>\n<p id=\"689c\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">AWS ElastiCache is accessed through the Amazon Elastic Compute Cloud (EC2) instance; it is not open to the internet. So, a Redis instance in an organization or personal account within a VPC can be accessed via ElastiCache from the EC2 instance within the same VPC.<\/p>\n<p class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">To access the cache from outside the VPC, but within the same Amazon Network or another VPC, VPC peering must be implemented. AWS ElastiCache for Redis has been exposed as a web service that makes it easy to set up, manage and scale cache in the Cloud.<\/p>\n<p data-selectable-paragraph=\"\"><img decoding=\"async\" class=\"aligncenter wp-image-75422 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-redis-cache.png\" alt=\"AWS Redis Cache\" width=\"669\" height=\"384\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-redis-cache.png 669w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-redis-cache-300x172.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-redis-cache-640x367.png 640w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/p>\n<h4 class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\">Challenges and Limitations AWS ElastiCache for Redis<\/h4>\n<p id=\"ad26\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">The following are challenges posed when using AWS ElastiCache Redis:<\/p>\n<ul>\n<li id=\"a524\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">It is a data structure server with commands supports, but no query language.<\/li>\n<li id=\"f40c\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Provides only basic security at the instance level (such as access rights).<\/li>\n<li id=\"871d\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis is an in-memory store, so all data must fit in memory.<\/li>\n<li id=\"3ee2\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Because all data is stored in the main memory, there is a risk of data loss from server or process failure.<\/li>\n<li id=\"b4ec\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Redis offers only 2 options for persistent regular snapshotting and append-only files, neither of which are secure as real transactional servers.<\/li>\n<li id=\"39b2\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">Connection to Redis cache from a local machine requires an SSH tunnel into the EC2 instance VPC with Redis cache.<\/li>\n<li id=\"3476\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\">DevOps engineers must ensure security groups are configured and enabled for required microservices or applications needing access to the AWS ElastiCache for Redis service.<\/li>\n<\/ul>\n<h3 id=\"82e2\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: left;\"><span class=\"ez-toc-section\" id=\"Final_Words\"><\/span>Final Words<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"60d9\" class=\"ga gb ap cd gc b gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs cv\" style=\"text-align: justify;\" data-selectable-paragraph=\"\">This article focused on the use of AWS ElastiCache for Redis to provide caching solutions with easy integration for application code. If sharing cache data across applications is required, AWS ElastiCache for Redis enables sharing and accessing data across multiple applications without restart and refresh. It is noteworthy that many improvements are gained by using AWS ElastiCache for Redis in place of, essentially, the same functionality that comes with the in-memory cache.<\/p>\n<p style=\"text-align: justify;\" data-selectable-paragraph=\"\">Note that AWS ElastiCache is an important topic to cover for those preparing for the AWS certifications. So, if you are preparing for any AWS certification exam, enroll into our <a href=\"https:\/\/www.whizlabs.com\/aws-certifications\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS certification training courses<\/a> and get prepared to become a certified AWS professional!<\/p>\n<p style=\"text-align: left;\" data-selectable-paragraph=\"\">Credit: The content has originally been published on <a href=\"https:\/\/medium.com\/@vveeravelu.learn\/aws-elasticache-for-redis-as-application-cache-43162660393d\" target=\"_blank\" rel=\"noopener noreferrer\">Medium<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the modern cloud computing world, most applications use caching to reduce latency and improve performance for read-heavy workloads. In any application, caching plays an important role and can be applied to various layers such as database, UI layer (Session Management), file system, and operating system. While implementing caching, it is important to understand whether or not caching particular data will improve performance and reduce load. Issues related to JVM in-memory cache, when used in monolithic applications, are well documented. Since most modern applications are moving toward microservices, a third-party caching service, which will be a good fit with a [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":75405,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[3473,3474,3472],"class_list":["post-75404","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws-certifications","tag-aws-elasticache","tag-aws-elasticache-for-redis-as-application-cache","tag-aws-redis-cache"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/06\/aws-elasticache-for-redis.png",150,79,false]},"uagb_author_info":{"display_name":"Pavan Gumaste","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/pavan\/"},"uagb_comment_info":3,"uagb_excerpt":"In the modern cloud computing world, most applications use caching to reduce latency and improve performance for read-heavy workloads. In any application, caching plays an important role and can be applied to various layers such as database, UI layer (Session Management), file system, and operating system. While implementing caching, it is important to understand whether&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/75404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=75404"}],"version-history":[{"count":5,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/75404\/revisions"}],"predecessor-version":[{"id":75459,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/75404\/revisions\/75459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/75405"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=75404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=75404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=75404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}