Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.
| Field | Detail |
|---|---|
| Repository | redis-lab |
| Primary language | Mixed / documentation |
| Topics | cache, database, database-labs, devarent, docker, key-value, lab, nosql, redis |
| License | MIT |
| Branch | main |
| Maintainer | @devarent |
redis-lab is a hands-on repository focused on: Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.. Primary language: Mixed / documentation. Topics: cache, database, database-labs, devarent, docker, key-value, lab, nosql, redis. The README below documents the project; use the table above for a quick overview.
🇮🇸 Iceland · 🇳🇿 New Zealand · 🇨🇭 Switzerland · 🇸🇮 Slovenia · 🇮🇪 Ireland · 🇦🇹 Austria · 🇵🇹 Portugal · 🇸🇬 Singapore · 🇫🇮 Finland
Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.
Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.
Redis is the default answer for caching, sessions, rate limits, and lightweight queues. This lab starts a persistent Redis instance, gives you a command cheat sheet, and includes a Python client so you can see the same operations from application code.
docker compose up -d
docker compose exec redis redis-cli
docker compose exec -T redis redis-cli < examples/commands.redis
python -m pip install redis
python examples/redis_client.py| Field | Value |
|---|---|
| Host | localhost |
| Port | 6379 |
| URL | redis://localhost:6379/0 |
| Password | (none in this lab) |
| CLI | docker compose exec redis redis-cli |
| File | What it shows |
|---|---|
docker-compose.yml |
Engine, ports, and persistent volume. |
.github/workflows/compose-check.yml |
Validates the Compose file on every push. |
examples/commands.redis |
Core data structures and expiry commands. |
examples/redis_client.py |
The same operations from Python with redis-py. |
- Implement a fixed-window rate limiter with
INCRandEXPIRE. - Cache a slow function result with a 30-second TTL and measure the difference.
- Use a sorted set to build a leaderboard with pagination.
- Inspect
INFO memoryand explainused_memory_peak.
- This lab has no password. Add
--requirepassand a private network before exposing Redis. appendonly yesenables the AOF persistence mode; data lives in theredis-datavolume.- Redis 8 includes query and vector features, but this lab sticks to the core data structures.
- Use
SCANrather thanKEYSon any dataset that matters.
This lab publishes its ports on 127.0.0.1 only. To use it from another country, do not open the database port to the internet. Pick one:
- VPS + private tunnel: run the lab on a small Ubuntu VPS, keep the port closed, and connect through WireGuard or
ssh -L. - Managed service: use a managed free tier for this engine and point the same examples at its connection string.
- HTTP UI only: if the engine has a web UI, put it behind Caddy with TLS and basic auth.
The shared checklist, provider map, and commands are in REMOTE-ACCESS.md.
docker compose down -v-v also removes the named volume, so the next start is a clean slate.
Part of the database-labs collection: 26 database engines, one index.
MIT (c) 2026 Arya Fatthurahman. See LICENSE.
Full Tech Stack Wall
Connection names shown in the DBX sidebar - decorative reference badges.