# Lambda Architecture

> A slow, exact batch path and a fast stream path. The two are joined at the end.

**Field:** Data Engineering  
**Category:** Foundations

## Think of it like

It is like a slow, careful clerk and a fast helper. The helper gives a quick guess. The clerk fixes it at night.

## Definition

Lambda architecture runs a batch path and a stream path side by side. The batch layer goes over all the data on a schedule and gets exact answers. The speed layer handles new events at once and gives quick, rough answers. A serving layer joins both, so readers see fresh and correct data. The cost is two copies of the same logic to keep in step.

## Example

A shop counts page views. The speed layer shows today's rough count live. Each night the batch layer redoes the count exactly and replaces it.

## Why it matters

It was an early way to get both speed and the right answer. The tools back then could do only one of those well.

## Common mistake

Forgetting the double work. Every rule must be written twice, once for each path, and the two drift apart.

## Three principles

- **Batch layer.** Slow, exact answers over all the data.
- **Speed layer.** Fast, rough answers over new data.
- **Serving layer.** Joins both views for readers.

## Related terms

- [Kappa Architecture](https://learn.benibix.com/term/data/kappa-architecture)
- [Batch Processing](https://learn.benibix.com/term/data/batch-processing)
- [Stream Processing](https://learn.benibix.com/term/data/stream-processing)

## Told apart from

- [Lambda Architecture vs Kappa Architecture](https://learn.benibix.com/compare/lambda-architecture-vs-kappa-architecture): People think Kappa is just Lambda with a part cut off, and it is more than that. Lambda runs the same logic twice, once in a nightly batch and once live, and joins the two. Kappa runs it once, in a stream. When the logic changes, Kappa replays its log from the start instead of keeping a batch path.

## Taught in

- [Lambda and Kappa Architecture](https://learn.benibix.com/learn/data-foundations/lambda-and-kappa-architecture): Data Engineering Basics, 6/11

![Left: Lambda, where new data splits into a batch layer and a speed layer that meet again in a serving layer. Right: Kappa, where all data flows through one stream layer into the serving layer, and old data is replayed through the same stream.](https://learn.benibix.com/diagrams/lambda-vs-kappa.svg)

---

Source: https://learn.benibix.com/term/data/lambda-architecture
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
