← Lessons

quiz vs the machine

Gold1470

System Design

Lambda versus Kappa Revisited

Two ways to combine batch accuracy with streaming freshness in one pipeline.

5 min read · core · beat Gold to climb

The problem they solve

You want results that are both fresh and accurate. A streaming layer is fast but approximate. A batch layer is slow but exact and easy to reprocess.

The lambda architecture

  • A batch layer recomputes exact views from all history on a schedule.
  • A speed layer computes recent results from the live stream to fill the gap.
  • A serving layer merges both so queries see complete answers.
  • The pain is two codebases that must stay logically identical.

The kappa architecture

Kappa keeps only the stream. Reprocessing means replaying the event log through the same code with a new version, then swapping outputs. One pipeline, one codebase, but it depends on a durable, replayable log.

Modern systems lean toward kappa because replayable logs and capable stream engines remove most of the reason for a separate batch layer.

Key idea

Lambda runs batch and speed layers together for accuracy plus freshness, while kappa uses one replayable stream to get both with less duplication.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the main drawback of the lambda architecture?

2. How does kappa reprocess data correctly?