What is Redis?
Redis is an in-memory data store. Because it keeps data in RAM, it answers reads and writes with very low latency, which makes it well suited to caching, session storage, rate limiting, and lightweight message queues. It supports rich data types - strings, hashes, lists, sets, and more - so applications use it for far more than simple key/value caching.
Caches are transient by nature: data in a cache can be regenerated from the source of truth, so it is safe to clear. Other Redis uses, such as user sessions or job queues, need their data to survive restarts. TurboStack handles both needs by running two separate instances.
On TurboStack
TurboStack runs Redis by convention as two instances on each host so that disposable cache data and durable data never share the same store:
- Port 6379 - cache. Transient data only. Safe to clear at any time; nothing important is lost.
- Port 6378 - persistent. Durable data such as sessions and queues, intended to survive restarts.
Redis is enabled by default. Its maximum memory is auto-sized to the host, so you normally do not need to tune it. See Performance tuning for guidance on sizing.
Tip
Point throwaway cache traffic at port 6379 and anything you must not lose at port 6378.
Best practices
- Send only regenerable cache data to the 6379 instance; never store data there you cannot rebuild.
- Use the persistent 6378 instance for sessions, queues, and other durable state.
- Let memory auto-sizing do its job; only override it for a measured, specific need.
- Set sensible key expirations so the cache stays within its memory budget.
- Restrict access so only the applications on the host can reach the instances.