
Redis is the #8 database on Earth and its oldest rival is #39. That gap is not
an accident — and the price of the victory is the flaw story that follows.
Against Memcached: the old guard, out-structured
Memcached got there first, and is still excellent at one thing: caching raw
bytes. Redis beat it by being a data structure server instead of a byte
bucket:
- Structures: lists, sets, hashes, sorted sets, streams — Memcached only
stores opaque blobs, so logic lives in your app. - Persistence: Redis can save to disk; Memcached is memory-only, and a
restart means a cold cache. - Topology: Redis has replication and clustering; Memcached is a loose pool.
- Features: expiry, pub/sub, transactions, Lua scripting.
DB-Engines (November 2026) scores the fight 163.29 to 12.99. Memcached made
things simple; Redis made things possible.
Against PostgreSQL/MySQL: the database that must not blink
A relational database buys durability and complex queries with milliseconds of
latency. Redis buys microseconds with volatility:
- Redis is 10–100× faster for lookup-heavy work — no index, no schema, no
query planner for a simple key fetch. - Redis is schemaless — keys can hold different shapes; a database needs
migrations for every shape change. - The database wins where Redis loses: transactional integrity, joins,
reporting, data that must outlive a crash.
That is why the real architecture is both: Postgres is the truth, Redis is the
speed. The trade — and it is central to this disclosure — is that Redis took
on the trust responsibilities of a server without the durability of a
database, and many teams forgot which half they bought.
Against Kafka: the queue that cannot replay
Kafka is a durable, replayable event log built for massive scale. Redis streams
are an in-memory approximation:
- Redis wins on latency, simplicity, operations: one small process vs a whole
cluster; queue semantics a junior can learn in an hour. - Kafka wins on scale, retention, replay: Redis queues are bounded by RAM; Kafka
spills to disk and keeps history for weeks.
Under ~10k events/sec with no replay requirement, Redis is the cheaper, faster
broker. Above that — or when events must survive restarts — Kafka is the honest
choice. The subtle danger comes later: teams that treat Redis as a durable
broker discover the truth at the worst possible moment.
Against RabbitMQ, Elasticsearch — and the summary
RabbitMQ guarantees delivery, routing and poison-message handling; Redis lists
are a makeshift queue with sub-millisecond latency and zero extra
infrastructure. When delivery must not be lost, RabbitMQ. When it can survive
occasional loss, Redis.
Elasticsearch is not Redis's competitor at all — except for autocomplete and
prefix lookup, where Redis sorted sets are faster and simpler, which is why
they keep appearing embedded everywhere.
The summary advantage: one process replaces seven specialist tools. The
summary cost, which Parts 5–9 will unwrap: the security posture of a cache
applied to the responsibilities of a session store, a broker and a
coordination service — at the same time.
Next: Part 5 — the engine room: how one thread outruns a thousand, and what
that design means when a parser goes wrong.

Comments (0)