AlgoViz

Redis

medium 34 min

Redis keeps its whole dataset in memory and runs commands one after another, so every command is atomic and most take well under a millisecond.

Where it shows up

The same pattern appears across everyday software.

  • Uber: CacheFront

    Uber's storage layer reads from Redis first and falls back to its storage engine. A change data capture service invalidates entries. Its 2025 article reports more than 150 million rows a second at peak.

  • GitHub: Resque

    In 2009 GitHub published Resque, which keeps background job queues in Redis lists because pushing and popping are atomic and constant time.

  • Sessions

    Web servers stay stateless by keeping each login session as a hash with a TTL. Any server can handle the next request.

  • Leaderboards

    Games keep scores in a sorted set. The top ten and one player's rank come back without sorting anything.

  • Rate limits at the edge of an API

    Every gateway server counts in the same Redis, so a user cannot escape the limit by reaching another server.

  • Local cache invalidation

    Servers keep a small cache in their own memory and subscribe to a channel that names the keys to drop. A short TTL covers messages that were missed.