Cloud & Software Development

Redis

Also known as: Redis cache, Redis server, Valkey, ElastiCache

Redis (Remote Dictionary Server) is an in-memory database.

Data lives in RAM, so reads and writes happen in microseconds: far faster than a disk-based database. It's used for caching (storing frequently accessed data), session management, rate limiting, pub/sub messaging, and as a fast key-value store.

Redis, explained at three levels

At home

Redis is like a super-fast notepad that your application keeps in memory. Looking something up takes microseconds instead of milliseconds. When your app needs to show the same data repeatedly (like a leaderboard or session info), Redis serves it almost instantly instead of hitting the database each time.

At work

Developers use Redis to make applications faster by caching: instead of asking the database for the same information 1000 times per second, the result is cached in Redis and served instantly from memory. The database is only queried when the cache expires or changes.

Real-world examples

At home

Thomas added Redis caching to his web app for the top 10 most-visited pages. Database queries for those pages dropped by 95%, and response times fell from 200ms to 5ms.

At work

Marcus's team uses Redis for three purposes: caching API responses (TTL 60 seconds), storing user sessions (TTL 24 hours), and implementing rate limiting (100 requests per minute per user using INCR with expire). One Redis cluster handles all three.

Common confusions

  • Redis is just a cache and can't be the primary database — Many applications use Redis as a primary database for appropriate use cases: leaderboards, session storage, real-time analytics. With persistence enabled, data survives restarts. Redis is not appropriate for complex relational data, but it's not limited to caching.
  • Redis loses all data when the server restarts — By default, Redis can be configured with persistence (RDB snapshots or AOF logging). Most managed Redis services (ElastiCache, Redis Cloud) have persistence enabled by default.

For analysts

Redis is rarely used by BAs directly, but understanding it helps explain why some dashboards update in real time: Redis often powers the leaderboards, counters, and live metrics that feed BI tools.

History & origin

Redis was created by Salvatore Sanfilippo in 2009 while he was working on a startup and needed a fast data structure server for real-time analytics. It quickly became one of the most popular open-source databases. Redis Labs (now Redis Inc.) was formed to commercialize it. In 2024, Redis moved from the BSD licence to source-available licences (RSALv2 and SSPL), prompting forks including Valkey, backed by the Linux Foundation and adopted by AWS and Google Cloud. In 2025, Redis 8 added the open-source AGPL licence as an option.