Kafka vs Redis Streams, The Replay and Retention Trade-Off That Decides It

Kafka vs Redis Streams architecture diagram, a partitioned log on disk that replays against a stream held in RAM

Every backend team hits the same fork. The product needs events between services, and someone says Kafka before anyone has measured the traffic. Sometimes that is right. Often the team already runs Redis, which has carried a real log with consumer groups since version 5.0.

This comparison walks two workloads through both systems, an order-events stream that must survive a consumer outage, and a notification stream read by many services. It prices the history each keeps, in RAM on one side and on disk on the other, and ends with a scorecard.

Key Takeaways

  • Kafka is a distributed log built to keep history. Redis Streams is a log inside a data store built to be fast and already installed. The choice is mostly how much history you keep, and who runs the cluster.
  • Replay is the dividing line. Kafka rewinds any consumer to any offset inside retention. Redis replays only what trimming has not yet evicted.
  • If Redis is already in your stack and your replay window is hours, Streams usually wins. If events are your system of record, Kafka earns its cost.

If the streaming layer is one piece of a platform you are building, our custom software development work starts with the event flows and data stores together, so the broker fits the system around it.

The short version

The short answer first. Redis Streams is the default for most product backends, Kafka the specialist for when the stream becomes infrastructure.

AxisRedis StreamsKafka
History lives inMemory, trimmed by count or ageDisk, kept for a configured retention
ReplayAny entry still in the streamAny offset inside retention, per consumer
Scaling unitOne node per stream key, shard by handPartitions spread across brokers

What Kafka is

Kafka is a distributed commit log. Producers append records to topics, each split into partitions. A partition is an ordered, immutable sequence of records, and every record carries an offset, its position in that partition. That is the whole model, and everything else follows from it.

Because the log is the product, Kafka keeps records after they are read. The cluster retains everything for a configured period, two days in the documentation’s own example, weeks or months in many setups, and each consumer tracks only its own offset. A consumer can rewind and re-read history at will, which makes Kafka a system of record rather than a pipe.

Partitions are also the scaling unit. They spread across brokers, replicated with one leader and the rest followers, so a topic outgrows any single machine. Publish with a key and the key hashes to one partition, pinning every event for one order into a single ordered lane.

On top of the log sits an ecosystem Redis does not try to match. Kafka Connect moves data through ready-made connectors, Kafka Streams builds processing applications on the log, and schema tooling keeps producers and consumers honest. Since Kafka 4.0 (March 2025), the platform also runs without ZooKeeper. KRaft, its built-in consensus, is the only metadata mode, one less system to run.

What Redis Streams is

Redis Streams is a data type, not a platform. It arrived in Redis 5.0 as an append-only log inside the Redis your application already uses for cache, rate limits or queues. XADD appends an entry, a set of field and value pairs, stamped with a time-based ID. XRANGE reads history back by ID, and XREAD delivers new entries as they land.

The surprise is the consumption model, because it is Kafka-shaped. Create a group with XGROUP, read from it with XREADGROUP, and each entry goes to one consumer in the group. A consumer that finishes acks with XACK. An entry delivered but never acked stays in the group’s pending entries list, and XAUTOCLAIM hands idle pending entries to a living consumer. That is at-least-once delivery with crash recovery, in a handful of commands.

What Streams does not give you is a second system. No broker fleet, no partition rebalancing, no separate cluster to patch, and no disk-based history. The stream lives in memory, capped by trimming, by count with MAXLEN or by age with MINID, and whatever trimming removes is gone. Persistence is the usual Redis pair, RDB snapshots and an append-only file, which protect the stream across restarts without making RAM an archive.

Kafka vs Redis Streams outage diagram, replay from the log after a 3 AM consumer crash against recovery from the pending list
The operations question comes first. One of these is already on your monitoring wall.

Workload one, order events and the 3 AM outage

Take one workload and walk it through both. Illustrative example: a SaaS platform publishes an order event for every state change, placed, paid, packed, shipped, refunded. Billing, fulfilment and analytics each consume the stream independently. At 2,000 orders a day the rate is trivial. The interesting moment is the night the billing consumer dies at 3 AM, unnoticed for six hours.

On Kafka, the morning after is boring. The billing group simply stopped committing offsets, and the records sat in the partition, retained on disk, in order. Fix the bug, restart the consumer, and it works through the six-hour backlog in sequence. If the bug corrupted an hour of invoices first, reset the group offset to before the bad window and replay the stretch. The recovery touches neither producers nor the other consumers, because each group holds its own position in the same durable log.

On Redis Streams, the same night has two endings, and trimming decides. The billing group’s unacked entries wait in its pending entries list, and unread entries are still in the stream, so the same recovery works, XAUTOCLAIM reassigning the dead consumer’s pending work. That is the good ending, and the usual one at low volume. The bad ending arrives when the stream is trimmed aggressively, say a MAXLEN cap a busy morning burns through in four hours. Entries the group has not read yet are trimmed out from under it, archived nowhere. They are gone, and recovery becomes a reconciliation job against the orders database.

Workload two, one event and forty readers

Now the opposite shape. Illustrative example: a collaboration product emits activity events, a comment posted, a file shared, a task assigned, and forty services and webhooks want each one. Volume is moderate, a few hundred events a second at peak, but the fan-out is wide and most readers care about minutes, not months.

Kafka treats this as its home turf. Each reader is a consumer group with its own offset. A slow analytics consumer lagging an hour behind does not block the webhook consumer reading in near real time, because reading never deletes. Forty groups mean forty offset sets to monitor, and a cluster sized for aggregate read load, forty times the write load.

Redis Streams handles the same fan-out with forty groups on one stream, and at first it feels free, because Redis is already there. Every reader reads from memory, and the stream must stay small enough to leave RAM for the cache and queues sharing the instance. A reader that falls behind does not just lag. Past the trim line it loses the middle of the story, and unlike Kafka there is no offset error to warn you. The entries are simply absent.

Wide fan-out with forgiving readers suits Redis. Wide fan-out where every reader must catch up from any point suits Kafka, and every independent reader you add makes the shared durable log earn its keep.

Retention, memory and the cost of history

The deepest difference between these systems is not speed. It is what history costs.

Redis keeps history in RAM. Do the arithmetic on your own stream before you trust it. Illustrative calculation, assumption stated: one stored order event costs about 1 KB of memory, fields and overhead counted. At one million events a day, that is roughly 1 GB of RAM per day of history, so seven days cost about 7 GB and thirty days about 30 GB, before the cache data the same instance exists to hold. RAM is the most expensive storage you own, and it is also your working set.

Kafka keeps the same history on disk, where thirty days at one million events a day is the same roughly 30 GB, on cheap SSDs, replicated if you want, and boring. Retention of weeks or months is normal on Kafka because the medium makes it cheap. This is why headline throughput numbers mislead. In LinkedIn’s own published benchmark, three brokers on 2014-era hardware with spinning disks and 100-byte records took 2,024,032 writes a second from three producers. What it shows is the design’s intent. A sequential log on disk, batched end to end, was never the bottleneck.

Our InfluxDB vs TimescaleDB for IoT comparison runs the same test, and the pattern repeats. The system designed around the log keeps history cheaply. The system that borrowed a log charges for it in its scarcest resource.

Kafka vs Redis Streams history cost diagram, 10 GB of log segments on disk against 10 GB held in RAM and trimmed
History has a medium, RAM on one side and disk on the other, and the bill follows the medium.

Running it yourself, or renting the problem away

Neither system is hard to start. The difference is what month six looks like.

A Redis Streams setup inherits whatever you already do for Redis. Same deployment, same monitoring, same backups, one more data type to watch. The risks are Redis risks, memory pressure, an eviction policy nobody reviewed, a persistence setting left at a default. A team that runs Redis well runs Streams well from day one.

Kafka asks for a platform habit. Brokers need disk and partition management, groups need lag monitoring, rebalances need understanding, upgrades need a runbook. KRaft removed the ZooKeeper ensemble, but a three-broker cluster with replication is still a distributed system that pages you in its own accent. This is why so many teams rent it. Confluent Cloud, Amazon MSK and their competitors sell the cluster without the pager, at prices that grow with throughput.

Licensing belongs here now, because it changed. Apache Kafka sits under the Apache 2.0 license and is not moving. Redis moved in March 2024, dropping BSD for a dual RSALv2 and SSPLv1 model on version 7.4, and Redis 8 added AGPLv3 as a third option in 2025, per Redis’s own licensing page. For most self-hosted teams the effect is small. If your legal team rejected the source-available terms, the AGPL option, or the BSD-licensed Valkey fork of Redis 7.2, belongs on your evaluation list.

That long shadow is why the event backbone is an architecture decision on our SaaS startups work, not a library choice left to chance.

Where each one loses

Kafka loses on weight. For a backend moving a few thousand events a day, a replicated three-broker cluster is a second production system bought to solve a problem a data type already solves. It also loses at small scale, where batching, its efficiency trick, charges tiny workloads the delays without paying them the throughput. And it loses on team attention, every hour of it spent on partition strategy for a stream nobody else reads.

Redis Streams loses on ceiling. One stream key lives on one node, so a hot stream does not spread across a cluster by itself. You shard by hand, into orders-1, orders-2 and so on, and ordering and consumer logic must then know about the shards. It loses on history, as the maths above shows, and on ecosystem. When the stream must feed a warehouse, a search index and a lakehouse, Kafka Connect probably has the connector written. On Redis you write that consumer yourself.

Pick by the workload you actually run

Find your workload, start with the named system, then score it with the scorecard below.

Your workloadStart withWhy
Order, payment and billing events finance may need replayedKafkaDisk retention and per-group offsets make replay routine
Job triggers and task handoffs inside one productRedis StreamsConsumer groups and the pending list give queue semantics on kit you already run
Activity feeds and notifications read by many servicesKafka for full catch-up, Redis if minutes of history are enoughFan-out is free on both, catch-up guarantees are not
IoT and sensor ingest at sustained high volumeKafkaPartitions spread writes across brokers, one Redis stream scales to one node
A cache-first product adding its first event flowRedis StreamsZero new infrastructure, and the ceiling sits far above a first flow

Workloads that sit between two rows deserve a deliberate architecture call. It is the same call we make early in our AI product development engagements, because AI features inherit whatever their event stream guarantees.

Score both on your own traffic

Score both systems on your own traffic, 0, 1 or 2 per line. Use your real event rate, replay needs and team, not the vendor demos. A zero on replay window or on operations ends the evaluation whatever the total says.

TestWhat earns a 2
Replay windowYour window fits inside retention with room to spare, at a cost you have calculated
Outage drillKill a consumer for six hours in staging, then prove it catches up with nothing lost or double-processed
OrderingEvents for one entity arrive in order on the path your code reads
Fan-outEvery planned reader group can lag and catch up without affecting the others
Memory or disk budgetThirty days of your real volume fits the medium without squeezing the working set
OperationsA named person on your team can run it, upgrade it and explain its failure modes today

Mistakes that quietly cost teams

  • Reaching for Kafka by reputation. The default at big companies is not evidence about your traffic. Count your events per second and your replay window before you count brokers.
  • Running Redis Streams with no trim policy. An untrimmed stream grows until memory pressure bites or the instance falls over. Set MAXLEN or MINID on day one, and alert on stream length.
  • Forgetting the pending list. Entries a crashed consumer never acked are not lost, but they are not moving either. Nothing redelivers them until someone claims them, so XAUTOCLAIM or an equivalent sweeper is part of the design.
  • Assuming exactly-once because the brochure said so. Kafka’s exactly-once covers producing and consuming inside Kafka, with idempotent producers and transactions on. Once an event drives a payment or an email outside Kafka, your handler still needs to be idempotent. Redis is at-least-once throughout, so the same rule applies from the start.

The rule to keep

Keep the history question first. How far back must a consumer be able to rewind, and what does that history cost in the medium each system stores it in? Answer that with your own numbers and the winner usually names itself. Everything else, throughput included, is a detail both systems handle at product scale.

If you want the event architecture reviewed before it hardens, let’s discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906.

Questions engineers ask

Can Redis Streams replace Kafka?

For most product backends, yes. If your events fit in memory for the replay window you need and Redis is already in your stack, Streams gives you consumer groups, acks and crash recovery without a new platform. It stops replacing Kafka when history must be kept for weeks, one stream outgrows one node, or you need Kafka’s connectors.

Is Kafka overkill for a small SaaS product?

Usually, at the start. A few thousand events a day through a three-broker cluster buys guarantees the product does not use yet, and costs you a second production system. Start on Redis Streams or a plain queue, and adopt Kafka when a measured limit, not a reputation, asks for it.

How long can Redis Streams retain events?

As long as your memory budget allows. Retention is set by trimming, by count with MAXLEN or by age with MINID, and every retained entry lives in RAM. At roughly 1 KB per entry, one million events a day needs about 1 GB per day of window, so a weekend of cover is cheap and a quarter of history is not.

Does Kafka guarantee exactly-once delivery?

Inside Kafka, it can. An idempotent producer, on by default since Kafka 3.0, stops retries duplicating records in a partition, and transactions make multi-partition writes atomic. End to end, no system can promise it for you. Once an event triggers a charge or an email, exactly-once becomes your handler’s job, on Kafka and Redis alike.

What happens to unconsumed events when a consumer crashes?

On Kafka, nothing happens to them. They stay in the partition until retention expires, and the recovering consumer resumes from its last committed offset. On Redis Streams, entries read but never acknowledged wait in the pending entries list until another consumer claims them with XAUTOCLAIM, and unread entries stay in the stream. Both recover, Redis only with the claiming step built in.

When should a team migrate from Redis Streams to Kafka?

When a measured limit arrives, not before. The usual triggers are a replay window that outgrows memory, a stream needing more throughput than one node offers, outside readers who need durable catch-up, or a connector you would otherwise build yourself. Migrate the busiest stream first.

Sources

  • Apache Kafka documentation, Introduction and Design, kafka.apache.org, read 15 November 2026.
  • Apache Kafka, KafkaProducer API documentation, kafka.apache.org, read 15 November 2026.
  • Apache Kafka blog, Kafka 4.0.0 release announcement, 18 March 2025.
  • LinkedIn Engineering blog, Benchmarking Apache Kafka, 2 Million Writes Per Second (On Three Cheap Machines). Three brokers, 100-byte records, 2,024,032 writes per second with replication.
  • Redis documentation, Redis Streams, redis.io, read 15 November 2026.
  • Redis documentation, Redis persistence, redis.io, read 15 November 2026.
  • Redis, Licenses page, redis.io, read 15 November 2026.
Arslan Mushtaq, Founder of Denebly

WRITTEN BY

Arslan Mushtaq

Founder, Denebly

Arslan founded Denebly in 2018 and leads its AI development work for startups and mid-size businesses, across AI chatbots, agentic workflows, RAG systems, machine learning and automation. Denebly has delivered 100+ projects from Dallas, Texas.

Connect on LinkedIn More about Arslan

Ready to Solve Your Business Problems With AI?

Tell us what you are trying to build, automate or fix. You will get an honest assessment within one business day, not a sales pitch.

Custom AI development for startups and growing businesses. Chatbots, agents, machine learning and automation that deliver measurable results.

sales@denebly.com
Dallas, Texas, USA

Get Started Free Consultation AI Readiness Audit Pricing Response within 24 hours You own the code & data