Skip to content
devarentPublic

About

Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

redis-lab

Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.

At a glance

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

Overview

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.

Global references

🇮🇸 Iceland · 🇳🇿 New Zealand · 🇨🇭 Switzerland · 🇸🇮 Slovenia · 🇮🇪 Ireland · 🇦🇹 Austria · 🇵🇹 Portugal · 🇸🇬 Singapore · 🇫🇮 Finland


redis-lab LANG multi STARS 0 LICENSE MIT
OPEN SOURCE BUILT IN PUBLIC HANDS ON LABS DOCUMENTED

Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.


Arya Fatthurahman

Redis Lab

Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.

Database: Redis Category: Key-value / cache Runs in Docker License: MIT compose-check

What this lab is

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.

Quickstart

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

Connection details

Field Value
Host localhost
Port 6379
URL redis://localhost:6379/0
Password (none in this lab)
CLI docker compose exec redis redis-cli

Examples

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.

Exercises

  1. Implement a fixed-window rate limiter with INCR and EXPIRE.
  2. Cache a slow function result with a 30-second TTL and measure the difference.
  3. Use a sorted set to build a leaderboard with pagination.
  4. Inspect INFO memory and explain used_memory_peak.

Notes and limits

  • This lab has no password. Add --requirepass and a private network before exposing Redis.
  • appendonly yes enables the AOF persistence mode; data lives in the redis-data volume.
  • Redis 8 includes query and vector features, but this lab sticks to the core data structures.
  • Use SCAN rather than KEYS on any dataset that matters.

Run it from anywhere

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.

Cleanup

docker compose down -v

-v also removes the named volume, so the next start is a clean slate.

References


Part of the database-labs collection: 26 database engines, one index.

License

MIT (c) 2026 Arya Fatthurahman. See LICENSE.


Tech Stack

Git
Full Tech Stack Wall

Languages
Rust Go TypeScript JavaScript Java Python C C++ Kotlin Swift Ruby PHP Lua Shell

Frontend & Desktop
Vue React Svelte Next.js Nuxt Flutter React Native Tauri Electron Vite HTML5 CSS3 Sass Less Tailwind CSS Bootstrap Three.js Node.js jQuery

Database & Storage
MySQL PostgreSQL SQLite SQL Server Oracle Redis MongoDB DuckDB ClickHouse Elasticsearch Neo4j InfluxDB Cassandra DynamoDB Firebase Supabase MinIO Firebird IBM DB2 MariaDB CockroachDB IRIS Databricks SQL Snowflake Qdrant Redshift Apache Kylin BigQuery VictoriaMetrics Databend TDengine Teradata

Messaging & Streaming
Kafka RabbitMQ RocketMQ Pulsar Flink

DevOps & Cloud Native
Docker Kubernetes Terraform Ansible Jenkins GitHub Actions GitLab CI Prometheus Grafana Nginx AWS Azure Cloudflare

Tools & Platforms
Git Linux macOS VS Code Vim Tmux Homebrew Postman Figma Markdown Maven Gradle CMake

Hands-on engineering, built and documented in the open.

DBX Connections

Firebird_5n1b JDBCX_d5pn IBM DB2_0leg MariaDB_80g9 SQL Server_wieh CockroachDB_mo9c IRIS_cz3h Databricks_SQL_rmue Snowflake_cm_h9 Redis_u0tv Qdrant_1r3s Elasticsearch_zfc3 Cassandra_d8eb MongoDB_vexq Redshift_p9d7 Apache Kylin_xmpz Neo4j_j3dsg BigQuery_homk Apache Kafka_xpqk VictoriaMetrics_m3sf InfluxDB_wuju Databend_dey6 TDengine_4c9i Teradata_rwlm

Connection names shown in the DBX sidebar - decorative reference badges.

About

Run Redis 8 in Docker and practice strings, hashes, lists, sorted sets, expiry, and a small Python client.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors