Overview
Streaming Architectures
Kappa vs Lambda — when the streaming engine is the system of record.
Why it matters
Kappa = streaming-only, replay from log. Lambda = batch + streaming side-by-side. Modern stacks (Kafka + Flink, Materialize) push Kappa further than ever.
Going deeper
Deciding between Kappa and Lambda:
Lambda Architecture (Batch + Streaming parallel paths):
- Pros: Safe. If the stream processor drops messages or loses state, the nightly batch corrects it.
- Cons: You have to write the same business logic twice—once in Scala/Java for the stream, once in SQL/Spark for the batch.
Kappa Architecture (Streaming only, infinite retention):
- Pros: Single codebase. To backfill or fix a bug, you simply point a new stream-consumer at the beginning of the Kafka topic and fast-forward it to the present.
- Cons: Harder to manage infrastructure. Storing petabytes of history in Kafka (or tiered storage) is administratively heavy. Windowing and out-of-order events become very complex.