Redis Essentials: Caching, Queues & Real-Time Data
Redis keeps data in memory, so it answers in under a millisecond. Learn its data types and the patterns behind fast apps: caching, sessions, rate limiting, job queues, leaderboards, pub/sub and locks, plus persistence, security and using Redis from Python, Node.js, Laravel and Django.
4
units
20
lessons
81
practice questions
~300
minutes
Start learning today
Create a free account, then unlock this and every other Pro course with Learnix Pro for KES 999/month.
Create free account I already have an accountOutcomes
What you'll be able to do
Understand when an in-memory store is the right tool
Use strings, hashes, lists, sets and sorted sets
Cache database results and expire them correctly
Build sessions, rate limiters, queues and leaderboards
Use pub/sub, streams, transactions and locks safely
Configure persistence, memory limits and security
Use Redis from Python, Node.js, Laravel and Django
How it works
Read it, see it, practise it
Each lesson explains one topic clearly, shows worked examples, checks your understanding with quick questions and ends with a practical task you complete yourself.
Clear explanations
Step-by-step lessons in plain language
20 in this course
Worked examples
Real code and examples you can copy and run
23 in this course
Quick checks
Test your understanding as you go
60 in this course
Fill the blank
Recall the key commands and syntax
20 in this course
Hands-on workspace
A practical task at the end of every lesson
20 in this course
Syllabus
Everything you'll encounter
What Is Redis and When to Use It
An in-memory key-value data store: why it is so fast, what it is used for, and what it should not replace.
Setting Up Redis & redis-cli
Run Redis with Docker, WSL or a free cloud database, and connect with redis-cli and Redis Insight.
Keys, Strings, Counters & Expiry
Name keys well, store strings, count with INCR, and make data disappear automatically with TTLs.
Hashes: Objects in One Key
Store objects like a user profile or cart as hashes and update individual fields.
Lists: Queues & Recent Items
Push and pop from both ends, keep "latest N" lists, and build simple queues.
Sets: Unique Members & Set Maths
Track unique items (tags, online users, who liked a post) and combine sets with intersections and unions.
Sorted Sets: Leaderboards & Rankings
Keep members ordered by score for leaderboards, top-N lists, priority queues and time-based data.
Counting at Scale: HyperLogLog & Bitmaps
Count millions of unique visitors in 12 KB with HyperLogLog, and track daily activity with bitmaps.
Geospatial: Nearest Drivers & Shops
Store locations and find nearby points within a radius, the core of delivery and ride-hailing apps.
Streams: Reliable Event Logs
Append events with XADD, read them with consumer groups, and acknowledge processing with XACK.
Caching Done Right
The cache-aside pattern, choosing TTLs, invalidating stale data and avoiding cache stampedes.
Sessions & Rate Limiting
Store sessions in Redis so any server can serve any user, and stop abuse with fixed-window and sliding-window limiters.
Job Queues & Pub/Sub
Run background jobs through Redis-backed queues and push real-time messages with publish/subscribe.
Transactions, Lua Scripts & Locks
Make several commands atomic with MULTI/EXEC and Lua, and prevent double processing with distributed locks.
Memory, Expiry & Eviction Policies
Watch memory use, set maxmemory and an eviction policy, and find big keys before they hurt.
Persistence: RDB, AOF & Replication
How Redis saves data to disk with snapshots and append-only files, and how replicas provide high availability.
Securing Redis
Passwords and ACL users, TLS, network binding and disabling dangerous commands.
Redis from Python & Node.js
Use redis-py and node-redis: connections, pipelines, JSON data and error handling.
Redis in Laravel & Django
Use Redis for cache, sessions, queues and rate limiting in Laravel and Django with a few settings.
Project: Flash Sale Backend
Build a flash-sale backend that survives a traffic spike: cached product page, atomic stock, rate limiting, queue and live leaderboard.
Finish the course, earn a verifiable certificate
Complete every lesson, then pass the 20-question final exam (70% to pass, unlimited retakes), to receive a Learnix certificate with a unique number anyone can verify online.