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.
Why teams use it
- Sub-millisecond reads/writes for hot data
- Versatile data structures beyond plain key-value
- Built-in TTLs, pub/sub and streams
Install it
docker run -d -p 6379:6379 redis:7
redis-cli ping # -> PONGA first working config
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 60Run and verify
redis-cli --stat
redis-cli INFO memory
redis-cli SLOWLOG GET 10Mistakes to avoid early
- Using Redis as a primary database without a persistence/backup plan
- Unbounded keys with no TTL slowly eating all memory
- Big O(N) commands (KEYS *) blocking the single-threaded server
Want 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.