Re

In-Memory Data Store

·View all resources →

Redis Learning Roadmap

Redis is an in-memory data structure store used as a cache, message broker, and session store. It's the most popular caching solution in the world — used by Twitter, GitHub, Stack Overflow, and millions of production backends. When your API is too slow, Redis is usually the answer. A relatively quick skill to learn with an outsized impact on system performance.

Total time

4–6 weeks

Stages

5 stages

Job-ready at

Stage 3

Career paths

2 paths

1
2
3
4
5

Before you start — Prerequisites

✓

Any backend language (Node.js, Python, Go)

Redis is a tool for applications — you need a backend to integrate it with.

✓

Basic understanding of databases

Redis is often used alongside a primary database — knowing the difference between a cache and a database helps.

✓

Basic networking (ports, connections)

Redis runs as a server on port 6379 — understanding client-server architecture helps.

1

Stage 1: Redis Basics

Strings, keys, and TTL

1 week

Topics to cover

What Redis is and when to use itSET, GET, DEL, EXISTS, KEYSTTL: EXPIRE, TTL, PERSISTINCR, DECR for atomic countersMSET, MGET for bulk operationsredis-cli and Redis Insight GUIKey naming conventions (:, :: delimiters)Installing Redis via DockerRedis Cloud free tierConnection with redis-py, ioredis, or go-redis

Bold = especially important

Milestone

You connect to Redis, store and retrieve string values, set expiry times, and use atomic counters — the foundation of all Redis use cases.

Project to build

API response cache

Wrap a slow third-party API call — check Redis first, cache for 60 seconds on miss, return cached on hit. Measure the latency difference.

2

Stage 2: Data Structures

Lists, hashes, sets, and sorted sets

1–2 weeks

Topics to cover

Hashes: HSET, HGET, HGETALL — store objectsLists: LPUSH, RPUSH, LPOP, LRANGE — queues/stacksSets: SADD, SMEMBERS, SINTERSTORE — unique valuesSorted Sets: ZADD, ZRANGE, ZRANK — ranked dataOBJECT ENCODING — understanding memory layoutHyperloglog: PFADD, PFCOUNT — cardinality estimationBitmaps: SETBIT, GETBIT, BITCOUNTStreams: XADD, XREAD (intro)Geospatial: GEOADD, GEODISTChoosing the right structure for a use case

Bold = especially important

Milestone

You use Redis hashes for user sessions, sorted sets for leaderboards, sets for unique tracking, and lists for activity feeds.

Project to build

Gaming leaderboard

ZADD player scores, ZRANGE to get top 10, ZINCRBY for score updates, ZRANK for player position — real-time leaderboard with sorted sets.

3

Stage 3: Caching Patterns & Session Storage

✓ Min. Job Ready

The most common Redis use cases

1–2 weeks

Topics to cover

Cache-aside (lazy loading) patternWrite-through cache patternCache invalidation strategiesSession storage: store/retrieve JWT or session dataRate limiting with sliding window (ZADD + ZREMRANGEBYSCORE)Rate limiting with fixed window (INCR + EXPIRE)Distributed locks with SET NX EXCache stampede preventionMulti-tenant key isolationMemcached vs Redis for pure caching

Bold = especially important

Milestone

You implement cache-aside caching, Redis-backed rate limiting, and session storage in a real backend application.

Project to build

Rate-limited API with Redis sessions

Express API with Redis rate limiting (100 req/min per IP), Redis session storage for auth, cache-aside for expensive queries.

4

Stage 4: Pub/Sub, Streams & Job Queues

Real-time messaging and background jobs

1–2 weeks

Topics to cover

Pub/Sub: PUBLISH, SUBSCRIBE, PSUBSCRIBEPub/Sub limitations (no persistence, no delivery guarantee)Streams: XADD, XREAD, XREADGROUPStreams vs Pub/Sub — when to use eachBullMQ: job queues with Redis backendJob priorities, delays, and retry logicWorker processes consuming jobsFailed job handling and dead letter queuesBull Board for queue monitoring UIRedis vs Kafka for event streaming

Bold = especially important

Milestone

You build a background job system with BullMQ — jobs are enqueued from the API and processed by a separate worker, with retries on failure.

Project to build

Email queue with BullMQ

API endpoint enqueues welcome emails, BullMQ worker processes them (mock send), retry on failure, Bull Board dashboard.

5

Stage 5: Production Redis

Persistence, clustering, and monitoring

1–2 weeks

Topics to cover

RDB snapshots vs AOF persistenceRedis Sentinel for high availabilityRedis Cluster for horizontal shardingMemory optimisation: maxmemory and eviction policiesEviction policies: LRU, LFU, volatile-lruMONITOR and SLOWLOG for debuggingRedis Cloud vs ElastiCache vs self-hostedTLS and AUTH for securityINFO command and metricsKeyspace notifications

Bold = especially important

Milestone

You configure Redis with AOF persistence, set a sensible eviction policy, understand the trade-offs of Sentinel vs Cluster, and secure it with TLS + AUTH.

Project to build

Production-ready Redis setup

Docker Compose with Redis + Sentinel, AOF enabled, maxmemory with allkeys-lru, TLS in development, monitored with Redis Insight.

Career paths that use Redis

Frequently asked questions

What is Redis actually used for?

Caching (reduce database load and API response times), session storage (store user sessions across multiple servers), rate limiting (count requests per IP per minute), job queues (background processing with BullMQ), pub/sub messaging (real-time events), and leaderboards/counters (atomic increment operations).

Is Redis a database?

Redis can be used as a primary database, but it's most commonly a secondary store alongside PostgreSQL or MongoDB. Data is stored in memory (fast) and optionally persisted to disk (durable). The trade-off: Redis is extremely fast but limited by available RAM.

Redis vs Memcached — which should I use?

Redis — it supports more data types (strings, lists, hashes, sets, sorted sets), has built-in persistence, pub/sub, scripting, and an active development community. Memcached is simpler and slightly faster for pure string caching, but Redis's versatility makes it the default choice for new projects.

How much data can Redis store?

Limited by available RAM. A single Redis node can typically hold tens of GB of data. For larger datasets, use Redis Cluster to shard data across multiple nodes. Redis on the free tiers of Redis Cloud or Railway gives you 25–30MB — enough for learning and small projects.

Does Redis lose data when the server restarts?

By default, yes — Redis is in-memory. You can enable persistence with RDB (snapshots) or AOF (append-only file). For session storage and caches, losing data on restart is acceptable. For job queues or critical data, enable AOF persistence or use Redis with a primary database as the source of truth.

Ready to start learning?

Browse our curated Redis resources — every course, book, and video ranked by quality.

View Redis Resources →