# Amazon ElastiCache

> A managed in-memory cache that keeps hot data close so apps answer instantly.

- Level: Intermediate
- Topics: AWS
- URL: https://tidbit.legios.com.ar/amazon-elasticache/
- In Spanish: [Amazon ElastiCache](https://tidbit.legios.com.ar/es/amazon-elasticache/)

**ElastiCache** is the AWS service that runs an in-memory data store for you, using the open source engines Valkey, Redis OSS or Memcached. Because the data lives in RAM instead of on disk, reading a value takes well under a millisecond. AWS handles the servers, patches, replicas and failover.

Its classic use is as a **cache**: a copy of answers that are expensive to compute or slow to fetch. Say the home page of a shop shows the 20 best-selling products, and building that list takes a heavy database query. The app runs the query once, stores the result in ElastiCache for a minute, and the next thousand visitors get it straight from memory. The database breathes, and pages load faster.

It is also used for things that need speed more than permanence: user sessions, rate limits, game leaderboards, short-lived counters. The trade-off is that memory is more expensive than disk and a cache can be emptied, so the real, durable copy of the data should still live in a database like Amazon RDS or Amazon DynamoDB.

## An analogy

The sticky note on your monitor with the phone numbers you dial every day. Looking there is instant; the full phone book is still in the drawer for everything else.

## Keep in mind

- Managed Valkey, Redis OSS or Memcached, run by AWS.
- Data in RAM means reads in microseconds, not milliseconds.
- Usually sits in front of a database to absorb repeated reads.
- A cache is a copy: the source of truth stays in the database.

## Go deeper

- [What is Amazon ElastiCache? (official docs)](https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/WhatIs.html)
- [Caching overview (AWS)](https://aws.amazon.com/caching/)
- [Cache (computing) on Wikipedia](https://en.wikipedia.org/wiki/Cache_(computing))

## Related terms

- [Open source](https://tidbit.legios.com.ar/open-source/): Software whose code anyone can read, use, change and share.
- [RAM](https://tidbit.legios.com.ar/ram/): The computer's short-term memory: fast, small and wiped when you turn it off.
- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [High availability](https://tidbit.legios.com.ar/high-availability/): Designing a system so it keeps working when one of its parts fails.
- [Database](https://tidbit.legios.com.ar/database/): An organized store of data that programs can search and update safely.
- [Amazon RDS](https://tidbit.legios.com.ar/amazon-rds/): A ready-made relational database that AWS keeps patched, backed up and running.
- [Amazon DynamoDB](https://tidbit.legios.com.ar/amazon-dynamodb/): A key-value database that answers in milliseconds no matter how big the table gets.
