Using ElastiCache Redis as an In-Memory Key-Value Store - AWS OpsWorks

Using ElastiCache Redis as an In-Memory Key-Value Store

Important

The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers. We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post or through AWS Premium Support.

Note

This topic is based on a Linux stack, but Windows stacks can also use Amazon ElastiCache (ElastiCache). For an example of how of how to use ElastiCache with a Windows instance, see ElastiCache as an ASP.NET Session Store.

You can often improve application server performance by using a caching server to provide an in-memory key-value store for small items of data such as strings. Amazon ElastiCache is an AWS service that makes it easy to provide caching support for your application server, using either the Memcached or Redis caching engines. AWS OpsWorks Stacks provides built-in support for Memcached. However, if Redis better suits your requirements, you can customize your stack so that your application servers use ElastiCache Redis.

This topic walks you through basic process of providing ElastiCache Redis caching support for Linux stacks, using a Rails application server as an example. It assumes that you already have an appropriate Ruby on Rails application. For more information on ElastiCache, see What Is Amazon ElastiCache?.