Redis Tutorial
Learn Redis step by step through 74 structured lessons. The course starts with essential concepts and progresses toward practical, advanced topics, with explanations, syntax, examples, common mistakes and exercises you can try yourself.
- Level: Beginner to advanced
- Format: 74 free, self-paced lessons
- Best for: Students, career changers and developers refreshing their skills
What You Will Learn
This learning path covers the following areas in curriculum order:
- Redis Fundamentals
- Strings
- Key Management
- Lists
- Hashes
- Sets
- Sorted Sets
- Expiration and Caching Patterns
- Transactions and Scripting
- Pub/Sub
- Redis Streams
- Persistence and Durability
- Replication and High Availability
- Redis with Application Code
- Best Practices and Administration
Who This Course Is For
This tutorial is suitable for complete beginners as well as learners who already know some programming and want a structured reference. Start from the first lesson if the subject is new to you. Experienced learners can use the curriculum below to jump directly to a specific concept.
How to Use This Tutorial
- Read each lesson in curriculum order and run every example yourself.
- Change the examples to test your understanding instead of only copying them.
- Complete the exercises and review the common-mistake sections before moving on.
- Bookmark this course page so you can return to the complete lesson index.
Course Contents
Redis Fundamentals
- Redis Introduction
- Installing Redis
- Redis Get Started (redis-cli)
- How Redis Works: In-Memory and Single-Threaded
- Redis Data Types Overview
- Keys and the Keyspace
Strings
- SET and GET
- String Expiration (EX, PX, EXAT)
- Atomic Counters: INCR and DECR
- APPEND and String Length
- GETSET and Conditional Set (NX, XX)
- MSET and MGET
Key Management
- DEL, EXISTS, and TYPE
- Expiring Keys: EXPIRE and TTL
- Persisting Keys: PERSIST
- Renaming and Scanning Keys
- Why KEYS Is Dangerous in Production
Lists
- Lists Explained
- LPUSH, RPUSH, and LRANGE
- LPOP and RPOP
- Using Lists as Queues and Stacks
- LINDEX, LSET, and LLEN
- Blocking List Operations (BLPOP, BRPOP)
Hashes
- Hashes Explained
- HSET, HGET, and HGETALL
- HDEL and HEXISTS
- Incrementing Hash Fields (HINCRBY)
- Modeling Objects with Hashes
Sets
- Sets Explained
- SADD, SMEMBERS, and SREM
- Set Operations: SINTER, SUNION, SDIFF
- SISMEMBER and Set Cardinality
- Using Sets for Tags and Unique Tracking
Sorted Sets
- Sorted Sets Explained
- ZADD and ZRANGE
- ZSCORE and ZRANK
- ZINCRBY and Leaderboards
- ZRANGEBYSCORE and Range Queries
- ZREM and Removing Members
Expiration and Caching Patterns
- Redis as a Cache
- Cache-Aside Pattern
- Cache Invalidation Strategies
- Choosing TTLs and Avoiding Thundering Herds
Transactions and Scripting
- Redis Transactions: MULTI and EXEC
- WATCH and Optimistic Locking
- Introduction to Lua Scripting (EVAL)
- Why Redis Commands Are Atomic
Pub/Sub
- Publish/Subscribe Explained
- SUBSCRIBE and PUBLISH
- Pattern Subscriptions (PSUBSCRIBE)
- Pub/Sub Limitations and When to Use Streams Instead
Redis Streams
Persistence and Durability
Replication and High Availability
Redis with Application Code
- Connecting to Redis from Node.js
- Connecting to Redis from Python
- Connection Pooling
- Rate Limiting with Redis
- Session Storage with Redis
- Distributed Locks with Redis
Best Practices and Administration
- Redis Security Basics (requirepass, ACLs)
- Monitoring Redis (INFO, MONITOR)
- Memory Management and Eviction Policies
- Common Redis Mistakes
- Redis Command Reference
Frequently Asked Questions
Is this Redis tutorial free?
Yes. The lessons listed on this page are free to read and can be completed at your own pace.
Do I need previous experience?
No previous experience is required for the introductory lessons. Some advanced modules are easier if you first complete the fundamentals in this course.
How should I practise?
Type and run the examples, deliberately change their inputs, predict the result before execution and build a small project after completing each major section.
