redis

  • Seven services in one development environment

    Apache, Nginx, PHP, MySQL, Redis, Beanstalkd and a mail catcher, on a laptop. Onboarding measured in minutes rather than days, and what it costs to run.

  • Consumer groups, and the pending entries list

    Reading a stream directly gives every consumer every message. A consumer group distributes entries between members and remembers which ones were handed out and not acknowledged. The pending…

  • Cache the computation, not the query result

    Caching the rows a query returned saves the database round trip and leaves the hydration, the mapping and the aggregation to happen on every request anyway. Profiling usually…

  • A cache stampede, and the lock that prevents it

    An expensive cached value expires under load and every concurrent request misses simultaneously, so forty requests all run the same four-second query at once and the database falls…

  • A queue table is not a queue

    SELECT … WHERE processed = 0 LIMIT 1, and two workers taking the same row. SKIP LOCKED makes the table viable; it does not make it a broker.

  • A stream is not a list, and XADD is not RPUSH

    A list used as a queue loses the message when a consumer crashes mid-work, because BRPOP removes it and there is no record that anything was in flight.…

  • XAUTOCLAIM does not exist yet, so XCLAIM and a timer

    When a consumer dies its pending entries belong to a name that will never acknowledge them, so something has to reassign them — and in Redis 5 that…

  • A Redis container without persistence is a deliberate choice

    The official Redis image saves to disk by default, and a cache that survives a restart is occasionally what you want and usually a way to carry a…

  • Redis modules exist now, and mostly you do not need one

    4.0 added a C module API, and the ecosystem that follows — search, JSON, time series, filters — is genuinely capable. It also means running a Redis that…

  • MEMORY USAGE tells you which key is the problem

    –bigkeys reports the largest key by element count, which is not the same as the largest by memory — a hash with 500 short fields is smaller than…