Caching for high-volume workloads with Amazon ElastiCache


In the last lesson, you created an application that allowed users to review restaurants and browse reviews left by other users. You used Amazon DynamoDB as the primary database for this application because of its performance at scale.

In this lesson, you see how to add caching to your restaurant-review application. Caching can help relieve pressure on your primary data store or reduce latency for popular workflows.

For this lesson, you use Amazon ElastiCache, a fully managed, in-memory caching solution provided by AWS. First, you learn why you would want to use ElastiCache. Then you work through the steps to create and configure an ElastiCache instance and use it in your application. At the end of this lesson, you should feel confident in your ability to know when and how to use ElastiCache in your application.

Time to complete: 3045 minutes

Purpose-built Databases - ElastiCache (17:05)
Why use ElastiCache?

Applications often need a durable, powerful database for their primary data storage. This could mean a relational database, such as Amazon Aurora, or it could mean a NoSQL database, such as DynamoDB or Amazon DocumentDB (with MongoDB compatibility). These databases provide powerful query capabilities with strong data guarantees that make them an excellent fit for your primary database.

But sometimes you need lower latency than you can get from a primary data store. Perhaps you have a common request flow in your application that is read significantly more often than it is written. For these situations, you may want to use an in-memory cache to help. You can save the results of frequently read queries to a cache to improve response times and reduce pressure on your primary database.

ElastiCache provides support for two open-source, in-memory cache engines: Redis and Memcached. When you use ElastiCache, you get a fully managed, in-memory cache. You aren’t responsible for instance failovers, backups and restores, or software upgrades. This frees you to innovate for your customers.

Lesson contents

In this lesson, you learn how to use ElastiCache as an in-memory cache for an existing application. This lesson has four steps.

Caching is an important tool to keep your application a high performer. In this lesson, you saw how to create and use a cache to speed up commonly used access patterns in your application. You should feel confident in your ability to use a cache in the future.