Performance at Scale with Amazon ElastiCache - Performance at Scale with Amazon ElastiCache

Performance at Scale with Amazon ElastiCache

Publication date: March 30, 2021 (Document revisions)


In-memory caching improves application performance by storing frequently accessed data items in memory, so that they can be retrieved without access to the primary data store. Properly leveraging caching can result in an application that not only performs better, but also costs less at scale. Amazon ElastiCache is a managed service that reduces the administrative burden of deploying an in-memory cache in the cloud.

Beyond caching, an in-memory data layer also enables advanced use cases, such as analytics and recommendation engines. This whitepaper lays out common ElastiCache design patterns, performance tuning tips, and important operational considerations to get the most out of an in-memory layer.

Are you Well-Architected?

The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.

For more expert guidance and best practices for your cloud architecture—reference architecture deployments, diagrams, and whitepapers—refer to the AWS Architecture Center.


An effective caching strategy is perhaps the single biggest factor in creating an app that performs well at scale. A brief look at the largest web, gaming, and mobile apps reveals that all apps at significant scale have a considerable investment in caching. Despite this, many developers fail to exploit caching to its full potential. This oversight can result in running larger database and application instances than needed. Not only does this approach decrease performance and add cost, but also it limits your ability to scale.

The in-memory caching provided by Amazon ElastiCache improves application performance by storing critical pieces of data in memory for fast access. You can use this caching to significantly improve latency and throughput for many read-heavy application workloads, such as social networking, gaming, media sharing, and Q&A portals. Cached information can include the results of database queries, computationally intensive calculations, or even remote API calls. In addition, compute-intensive workloads that manipulate datasets, such as recommendation engines and high-performance computing simulations, also benefit from an in-memory data layer. In these applications, very large datasets must be accessed in real time across clusters of machines that can span hundreds of nodes. Manipulating this data in a disk-based store would be a significant bottleneck for these applications.

Amazon ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. Amazon ElastiCache manages the work involved in setting up an in-memory service, from provisioning the AWS resources you request to installing the software. Using Amazon ElastiCache, you can add an in-memory caching layer to your application in a matter of minutes, with a few API calls. Amazon ElastiCache integrates with other AWS services such as Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Relational Database Service (Amazon RDS), as well as deployment management solutions such as AWS CloudFormation, AWS Elastic Beanstalk, and AWS OpsWorks.

In this whitepaper, we'll walk through best practices for working with ElastiCache. We'll demonstrate common in-memory data design patterns, compare the two open-source engines that ElastiCache supports, and show how ElastiCache fits into real-world application architectures such as web apps and online games. By the end of this paper, you should have a clear grasp of which caching strategies apply to your use case, and how you can use ElastiCache to deploy an in-memory caching layer for your app.