Redis (REmote DIctionary Server) is an in-memory data store that keeps data in RAM for very low-latency reads and writes, optionally persisting it to disk. Created by Salvatore Sanfilippo in 2009, it's most often used as a cache, a message queue, a rate limiter, or a session store sitting in front of a slower primary database.
Unlike a plain key-value cache, Redis supports several native data structures per key: strings, lists, hashes (field-value maps), sets, sorted sets (scored, range-queryable), streams, and bitmaps. A single Redis instance's core command execution is single-threaded, so individual commands — including multi-step ones like INCR — are atomic without extra locking. Persistence is optional and configurable: RDB takes periodic point-in-time snapshots, while AOF (append-only file) logs every write for finer-grained durability; many deployments run without either, treating Redis as a pure, disposable cache.
Clients connect using a redis:// URI (or rediss:// for TLS), which encodes host, port (default 6379), optional password, and database index:
redis://:mypassword@cache.example.com:6379/0
rediss://user:pass@cache.example.com:6380/1
KEYS * scans the entire keyspace and blocks the server on large datasets — use SCAN for iteration in production.EXPIRE/TTL on cache keys turns a cache into a slow memory leak that only shows up once RAM runs out.redis:// and rediss:// URIs with authentication, port, and database index.