An in-memory data store used as a cache, session store, queue and rate limiter. This walkthrough covers the mental model and the configuration you will actually touch.
Redis is an in-memory key-value store with rich data structures (strings, hashes, sorted sets, streams) used for caching, session storage, leaderboards, queues and rate limiting.
The configuration that matters
Cache-aside pattern and a simple rate limiter.
# cache-aside with a 60s TTL
redis-cli SET user:42 '{...}' EX 60
redis-cli GET user:42
# fixed-window rate limit
redis-cli INCR rl:ip:1.2.3.4
redis-cli EXPIRE rl:ip:1.2.3.4 60Principles to hold onto
- Set an eviction policy (e.g. allkeys-lru) and TTLs on cache keys
- Use SCAN instead of KEYS in production
- Right-size memory and monitor fragmentation
Everyday commands
redis-cli --stat
redis-cli INFO memory
redis-cli SLOWLOG GET 10Want senior help putting Redis to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.