Redis
A fast in-memory cache to make your app quicker
Redis
Redis is an in-memory store — it keeps small pieces of data in memory so they can be read and written extremely fast. You use it alongside your database, not instead of it: the database is the source of truth, and Redis makes the hot paths quick.
When you need it
- Sessions — keeping users logged in across requests.
- Caching — remembering the answer to an expensive query so you don't recompute it every time.
- Rate limiting — counting requests to stop abuse.
- Queues / real-time — lightweight job lists or pub/sub between services.
If your app feels slow because it recomputes or re-fetches the same things repeatedly, Redis usually helps. If you're just starting out, you can add it later.
How it connects
Link Redis to a service and StrictOps injects:
Most Redis clients (ioredis, redis, etc.) read this variable directly.
Settings explained
- Version — the Redis version. The newest (7.2) is a safe default.
- Plan — how much memory the cache gets. Because Redis holds data in memory, the plan is mostly about how much you can cache. Starter is fine to begin.
- Eviction policy — what Redis does when it runs out of memory.
allkeys-lru(drop the least-recently-used keys) is the right default for a cache. - Persistence — periodically saves the cache to disk so it survives a restart. Useful if you store sessions; optional for a pure cache.
Cost guidance
Redis is priced by memory. Start with the Starter plan — caches rarely need much memory early on — and increase only if you start evicting data you'd rather keep.