Simple definition
Redis associates keys with values and structures such as lists, sets and counters. Working primarily in memory makes it suitable for fast access. That does not, by itself, guarantee durable storage. The dataset’s role and the chosen configuration determine what the application may lose, rebuild or need to recover after an interruption.
Technical definition
An application can assign a time to live, or TTL, to a key. Expiration when that time elapses differs from eviction caused by memory pressure. Memory limits and eviction policies must match the workload: an essential session record has different consequences from a cached copy that can be generated again.
RDB snapshots and AOF persistence can write data to disk, depending on configuration. Their timing and write policies affect recovery after a failure. Replication is normally asynchronous; it does not replace persistence planning or independently retained backups. TCP 6379 is a usual, configurable port. Connectivity, authentication and permissions still need separate checks.
What is it used for?
Redis can reduce SQL database reads, hold sessions or maintain temporary counters. Its value depends on the work avoided and the cache invalidation strategy. A fast cache that returns an outdated result after an update can cause a functional error even while the Redis service itself remains healthy and reachable.
Practical example
A Laravel application caches an expensive catalogue result for one minute. Once the key expires, it rebuilds the value from the primary database. An empty cache should preserve application correctness and avoid uncontrolled simultaneous recalculation, which could suddenly overload the database during a restart or a burst of requests.
Key points
| Element | Role |
|---|---|
| TTL | Expires a key after a defined lifetime |
| Eviction | Removes keys according to memory pressure and policy |
| RDB | Dataset snapshot |
| AOF | Log of write operations, according to configuration |
Common problems
- High memory usage: inspect key sizes, expiration settings and the eviction policy.
- Stale value: check the selected key and invalidation after the underlying record changes.
- Disconnects or latency: correlate networking, client behavior, expensive commands and server activity.
Operational checks and limitations
Restrict network access and authorized accounts, and configure encryption where required. Decide whether Redis holds reconstructible cache entries or data that must survive an incident. Test restart and recovery behavior accordingly. Monitor memory, evictions, errors and replication lag so that the chosen durability assumptions remain visible in operation.