R

Redis

Redis is an in-memory data store used as a database, cache, and message broker for high-performance applications.

What is Redis?

Redis (Remote Dictionary Server) is an open-source, in-memory data structure store that can be used as a database, cache, message broker, and streaming engine. It provides sub-millisecond response times for real-time applications.

Redis Data Structures

  • Strings: Basic key-value pairs
  • Hashes: Field-value pairs
  • Lists: Ordered collections
  • Sets: Unique unordered collections
  • Sorted Sets: Scored, ordered collections
  • Streams: Append-only log structures

Redis Use Cases

Caching, session storage, real-time analytics, leaderboards, pub/sub messaging, and rate limiting.

Common Misconceptions

  • "Redis is just a cache" - Full-featured data store
  • "Redis loses data on restart" - Persistence options available (RDB, AOF)
  • "Redis doesn't scale" - Cluster mode supports horizontal scaling