Redis · Intermediate

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.

Units
4
Lessons
20
Practice questions
81
Minutes
~300

Start learning today

Try every course free for 7 days. After that, this course is in Learnix Pro (KES 699/month).

Create free account Log in

What you'll learn

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 the lessons work

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

  1. 1.1

    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.

  2. 1.2

    Setting Up Redis & redis-cli

    Run Redis with Docker, WSL or a free cloud database, and connect with redis-cli and Redis Insight.

  3. 1.3

    Keys, Strings, Counters & Expiry

    Name keys well, store strings, count with INCR, and make data disappear automatically with TTLs.

  4. 1.4

    Hashes: Objects in One Key

    Store objects like a user profile or cart as hashes and update individual fields.

  5. 1.5

    Lists: Queues & Recent Items

    Push and pop from both ends, keep "latest N" lists, and build simple queues.

  1. 2.1

    Sets: Unique Members & Set Maths

    Track unique items (tags, online users, who liked a post) and combine sets with intersections and unions.

  2. 2.2

    Sorted Sets: Leaderboards & Rankings

    Keep members ordered by score for leaderboards, top-N lists, priority queues and time-based data.

  3. 2.3

    Counting at Scale: HyperLogLog & Bitmaps

    Count millions of unique visitors in 12 KB with HyperLogLog, and track daily activity with bitmaps.

  4. 2.4

    Geospatial: Nearest Drivers & Shops

    Store locations and find nearby points within a radius, the core of delivery and ride-hailing apps.

  5. 2.5

    Streams: Reliable Event Logs

    Append events with XADD, read them with consumer groups, and acknowledge processing with XACK.

  1. 3.1

    Caching Done Right

    The cache-aside pattern, choosing TTLs, invalidating stale data and avoiding cache stampedes.

  2. 3.2

    Sessions & Rate Limiting

    Store sessions in Redis so any server can serve any user, and stop abuse with fixed-window and sliding-window limiters.

  3. 3.3

    Job Queues & Pub/Sub

    Run background jobs through Redis-backed queues and push real-time messages with publish/subscribe.

  4. 3.4

    Transactions, Lua Scripts & Locks

    Make several commands atomic with MULTI/EXEC and Lua, and prevent double processing with distributed locks.

  5. 3.5

    Memory, Expiry & Eviction Policies

    Watch memory use, set maxmemory and an eviction policy, and find big keys before they hurt.

  1. 4.1

    Persistence: RDB, AOF & Replication

    How Redis saves data to disk with snapshots and append-only files, and how replicas provide high availability.

  2. 4.2

    Securing Redis

    Passwords and ACL users, TLS, network binding and disabling dangerous commands.

  3. 4.3

    Redis from Python & Node.js

    Use redis-py and node-redis: connections, pipelines, JSON data and error handling.

  4. 4.4

    Redis in Laravel & Django

    Use Redis for cache, sessions, queues and rate limiting in Laravel and Django with a few settings.

  5. 4.5

    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.

Earn a verifiable certificate

Finish every lesson and pass the 20-question final exam (70% to pass). Each certificate has a unique number anyone can check online.

Get started

Helping with:

🍪 We use essential cookies to keep you signed in, protect your account and remember your settings. We don't use advertising or tracking cookies. Read our Privacy Policy.