What is Redis?
Redis is an in-memory data store — it keeps data in RAM, which makes it extraordinarily fast. It is most often used not as a primary database but as a layer in front of one: a cache that remembers recent answers, a place to store user sessions, or a queue passing jobs between services.
When should you use it?
Add Redis when something is too slow and you are computing or fetching the same thing repeatedly (cache it), when you need to share session data across servers, or when you need a fast queue or real-time features (live counters, leaderboards, pub/sub messaging).
How to set it up
Run with Docker: docker run -p 6379:6379 redis. Managed options include AWS ElastiCache and Upstash.
How it connects to your code
From Python use redis-py; from Node.js use ioredis. The commands are simple: SET key value to store, GET key to retrieve, with optional expiry times for caching.