Redis
In-memory data store for caching, queues and sessions. Redis is an in-memory key-value store with data structures such as strings, lists, hashes, sets and streams. It is used for caching, sessions, rate limiting, queues and pub/sub messaging, and also offers vector search. Its licence changed in 2024, and Valkey is a Linux Foundation fork that many cloud providers now offer.
When it is the right choice
- You need very fast reads for caching or session data
- You need simple queues, rate limiting or pub/sub between services
- You want to cache LLM responses or embeddings to cut cost and latency
- Not a primary database for data you cannot afford to lose without careful persistence settings
How we use it
- Run managed Redis or Valkey, or self-hosted with replication on Kubernetes
- Choose persistence and eviction settings to match how the data is used
- Monitor memory, hit rate and latency with alerts before memory runs out
- Add caching for model responses where repeated requests make it worthwhile
Related articles
Database Deployment Automation: Shipping Schema Changes Without the Quiet-Hours RitualDatabase deployment automation in practice: versioned migrations, expand and contract, lock-safe changes, a migration job in the pipeline, and a review step that reads every schema change before it runs.
Database Backup and Restore Testing: The Backup You Have Never RestoredDatabase backup best practices start with the restore. How we test PostgreSQL and MySQL restores on a schedule, measure recovery time, and know the backups work before we need them.Redis: frequently asked
Redis or Valkey?
For most uses they are interchangeable. Choose based on licence requirements and what your cloud provider offers; check the current Redis licence for your use.
Can Redis lose data?
Yes, if it restarts without persistence or with infrequent snapshots. Configure persistence appropriately, or treat the data as a rebuildable cache.
Running Redis, or deciding whether to? Tell us what you have; the first consultation is free.
Let's talk »