StaffCoder
Redis

Redis Exercises in Java, Node.js and Python

Java 25Node.js 24Python 3.13
1 module · 4 challengesSign up
Module 1 of 1 · 4 challenges

Strings & Key Basics

Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

First Keys

Sign up to unlock
40%2 of 5 solvedeasy
About this challenge

Move a session store off a per-process map and into Redis. Store session values under a defined key, read them back exactly as written including blobs that are not text, report whether a key exists and what type it holds, and delete keys — returning the number Redis actually removed.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Conditional Sets & Counters

Sign up to unlock
50%1 of 2 solvedeasy
About this challenge

Decide a claim in one command instead of two. Write a key only when it is absent, only when it already exists, or while returning the value it replaced — each with a single SET — and keep per-user counters with INCR, INCRBY, DECR and INCRBYFLOAT, letting Redis's own error surface when a counter holds something that is not a number.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Key Naming & Scanning

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

Give a sprawling keyspace one namespaced scheme, then iterate it without stopping the server: drive SCAN's cursor to completion with MATCH and COUNT rather than calling KEYS, discarding the duplicates a cursor can return. Rename keys with and without overwriting, set expiries, and remove large keys with the non-blocking delete.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Session Token Store

STAR
Solving it completes the module
100%1 of 1 solvedeasy
About this challenge

Build the session store the whole service signs people in with: issue a token exactly once with an expiry, refresh it while it is in use, revoke it on sign-out, count logins per user, and audit a user's open sessions on a live keyspace — using a cursor, never KEYS, and freeing keys without making other clients wait.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

About this path

Learn Redis as a datastore, from basic data structures to persistence, replication, messaging, and production troubleshooting.

This path starts with strings and keys, the basics most Redis work builds on. You talk to Redis from your own code in Java, Node.js or Python, so you should be able to write a small program in one of them. No earlier Redis experience is needed. The first module ends with a session token store, one of the most common ways web apps use Redis.

Frequently asked questions

6

What will I practice in this path?

Module 1, Strings & Key Basics, covers storing and reading keys, conditional sets and counters, key naming and scanning, and ends with a session token store, one of the most common ways web apps use Redis. Later modules move on to data structures, persistence, replication, messaging and production troubleshooting.

Is it free?

Yes. Every path and module except AI Engineering is open on a free account, with 1 hour of coding time a week and 1 solution unlock a month. Pro gives you unlimited session time (fair use) and unlimited solution unlocks.

Do I need to know Redis already?

No. You need to be able to write a small program in Java, Node.js or Python. The path starts from your first SET and GET.

How is this different from practising in redis-cli?

You don’t type commands into a shell. You write code that uses a real Redis client library against a real Redis server, the way you would at work, and tests check what your code actually stored.

What does this path run on?

You can work in Java 25, Node.js 24 or Python 3.13.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.