← Lessons

quiz vs the machine

Gold1430

System Design

The Kappa Architecture

Drop the batch layer and treat everything as a replayable stream over a durable log.

5 min read · core · beat Gold to climb

The simplification

Lambda architecture forces you to maintain batch and streaming logic side by side. Kappa architecture removes the batch layer entirely and runs a single streaming pipeline. There is one code path, not two.

How it works

  • All data flows into a durable replayable log, such as Kafka with long retention.
  • A single stream processor reads the log and produces serving views.
  • To recompute, you do not run a separate batch job. You replay the log from the start through a new version of the stream job.

Why this is appealing

  • One implementation: the same code computes both live and historical results, so no logic drift.
  • Reprocessing is normal: a logic change means spinning up a fresh consumer that reads the log from offset zero into a new view, then cutting over.

What it requires

  • The log must retain enough history to replay, which can be large and costly.
  • The stream processor must be fast enough that a full replay finishes in reasonable time.

Key idea

Kappa architecture treats batch as just a replay of the stream, so a single streaming codebase over a durable log handles both real time and historical recomputation.

Check yourself

Answer to earn rating on the learn ladder.

1. How does kappa architecture recompute historical results?

2. What is the key advantage over lambda architecture?