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
From Idea to AI Feature in Six WeeksHow an AI project runs end to end in six weeks: discovery, design, prototype, infrastructure, rollout, then measuring and improving.
CI/CD for Models and PromptsEvaluation gates, model registries, canary releases and rollback: applying CI/CD discipline to prompts and models in LLM applications.
Fine-Tuning or Prompting? A Decision Guide for Small TeamsWhen prompting, RAG or fine-tuning is the right way to adapt a language model, and what each one costs a small engineering team.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 »

