We have looked at several resources AWS provides.  These include databases, disk storage, and processing.  Now we turn to a way to access system memory via the ElastiCache service.

What is an In Memory DataStore?

When you look at the ElastiCache overview page, there is a focus on an in-memory data store.  It may help to start with that.  Computers traditionally have three places to store data.  These generally can be labeled as external, internal, and RAM.  External storage is data on a device outside of the computer such as a CD-ROM, floppy disk (if you remember them) or memory stick/external drive.  Internal storage is an internal hard drive whether that is disk based or solid state.  RAM is memory typically made available for core processing and the fastest memory to access.

In some modern devices like tablets and smartphones, there is a merge of internal and RAM storage so that everything is RAM.  This combination is why you do not tend to see the delays in starting your tablet that you do booting your desktop.

Accessing ElastiCache

This service provides two methods for accessing the storage, and both are open-source.  There is the Amazon service Redis and the widely used MemCached.  Redis is a topic for another day.  In either case, you start out by creating a cluster in the AWS console.  During this process, you select how many nodes, the size of the nodes and which approach (Redis or MemCached) to use to access the node data.  This step creates a live cluster and is not a free-tier option.  Thus, when working with ElastiCache, be prepared to turn things off when you are not using them.  Accomplish this goal by deleting nodes.

Once your cluster is up, you can store and retrieve data via the selected API.

Why is This Useful?

You may ask why in-memory data storage matters in this world of lightning fast databases.  Any way you slice it, in-memory access is still faster.  It may lack support for ad hoc queries of data, but that is not the purpose.  This sort of resource provides quick access to “already baked” data.  Uses include lookup lists, temporary data storage used in processing, or packets of data to pass through the system.

In a simple sense, think of this like having a folder open on your desk that you are working on.  If it stays on your desk, it is easier to access than if it goes back into your file cabinet.  In-memory data is very similar.  Note that this also allows multiple systems to access the same data.  This

Note that this also allows multiple systems to access the same data.  Thus, you can skip passing data from application to application (potentially a security risk) and instead leave it in the highly secure memory.  This approach is not only faster it also keeps your whole system more secure.

Looking Ahead

We will likely come back to ElastiCache in more detail in the future.  There are a couple of common uses that we can provide as a tutorial that we are considering.  There is also CodeStar which provides some options that use ElastiCache.  These include highly responsive websites and microservice architectures.  Take a look at the tutorials Amazon provides as well.  These are excellent resources for getting started, and they might help you find new ways to solve your common problems.

Rob Broadhead

Rob is a founder of, and frequent contributor to, Develpreneur. This includes the Building Better Developers podcast. He is also a lifetime learner as a developer, designer, and manager of software solutions. Rob is the founder of RB Consulting and has managed to author a book about his family experiences and a few about becoming a better developer. In his free time, he stays busy raising five children (although they have grown into adults). When he has a chance to breathe, he is on the ice playing hockey to relax or working on his ballroom dance skills.

Leave a Reply