An in-memory data store, keeps data in RAM for super-fast read/write speeds.
Data is key-value based.
Single-threaded execution (hence atomicity by default)
Keep data in memory, but can also persist to disk (optional):
// can be hybrid
Supports advanced data structures (not just strings).
| Type | Description | Example Use Case |
|---|---|---|
| String | Simple key-value | Cache HTML, tokens, counter, OTP |
| List | Ordered list of strings | Message queues, timelines |
| Set | Unique unordered values | Tags, likes, deduplication |
| Sorted Set (ZSet) | Unique values with scores | Leaderboards, ranking |
| Hash | Key-value within a key | User profile, object storage |
// Also support Bitmaps, HyperLogLogs, Streams, Geospatial indexes.
Used for:
Redis is NOT: