Skip to content
MERCIL

Technologies

Redis

An in-memory data store used for caching, session state, job queues and rate limiting, usually deployed next to a primary database that holds the main copy of the data.

Part of Tailor-made Software Development

Redis is an in-memory data store. Keeping data in memory makes reads and writes very fast. It is usually deployed alongside a primary database such as PostgreSQL.

Where it fits

Common uses are caching the results of expensive queries, holding session state so application servers can scale out, backing job queues, enforcing rate limits and coordinating locks between services.

Its limits

Memory is finite. Depending on the eviction policy, a full instance either removes keys or rejects writes. A restart can lose data written since the last snapshot, or all of it if persistence is off. Trouble starts when a system comes to depend on Redis as the only copy of business data. A useful check: if losing the whole Redis instance would corrupt business data instead of only slowing the system down, the design needs changing.

Cached data also needs a plan for expiry and invalidation. A cache that returns stale values causes errors that are hard to reproduce.

How we use it

We design systems so that cached data can be rebuilt from the primary database, set expiry times on cached keys, turn on persistence where Redis backs a job queue, and monitor memory use and evictions.

Web Application Development, DevOps & CI/CD

Cookies on this site

We use essential cookies to make this site work and, with your consent, Google Analytics and Hotjar session recordings to understand how it is used. Forms are hidden in recordings. Cookie policy