Skip to main content

Data Processing Does Not Belong in Streaming Platforms

Kafka made event streaming practical at scale. Pushing data processing into the streaming platform creates recovery, scaling, and isolation problems in production. Vendor documentation, Kafka improvement proposals, and migration case studies point to the same architectural boundary: streaming platforms handle durable transport, processing engines handle state and checkpoints. Separating them leads to systems that scale and recover cleanly.

Kafka changed the industry by making event streaming practical at scale. Durable logs, ordering, fan-out, and backpressure turned event-driven systems from fragile prototypes into mainstream infrastructure.

Where things get messy is when teams push data processing into the streaming platform itself: Kafka Streams, ksqlDB, broker-side transforms. It starts as convenience and ends as operational coupling. Not because engineers are doing it wrong, but because the streaming layer and the processing layer solve different problems.

The evidence is public: vendor documentation, Kafka KIPs, and real migration stories.

The boundary in one picture

Coupled: Processing inside the platform Transport and processing share cluster resources Kafka / Redpanda brokers Logs, ordering, replication, fan-out Kafka Streams / ksqlDB / Transforms State, queries, joins, aggregations X Recovery time grows with state size X Cannot scale processing independently X Resource contention across workloads Separated: Dedicated processing engine Transport and compute scale independently Kafka / Redpanda / KafScale Durable log, routing, backpressure Apache Flink / Spark / Wayang Checkpoints, state snapshots, isolation OK Seconds-to-recover with checkpoints OK Scale processing without scaling brokers OK Workload isolation by design
When processing lives inside the streaming platform, scaling and recovery get coupled to the broker fleet.

1. Replay-based state recovery does not age well

Kafka Streams restores state by replaying changelog topics. Simple mechanism, but recovery time grows with state size.

"Kafka Streams restore[s] the corresponding state store by replaying the changelog topic."

Confluent: Stateful fault tolerance in Kafka Streams

This becomes a production problem when state is large and failures are not hypothetical.

"Kafka Streams lacks a checkpointing mechanism for quick restoration after total system failures, leading to long recovery times."

Volt Active Data: Top 3 Kafka Streams Challenges
Recovery behavior as state grows Kafka Streams (replay) Minutes to hours Apache Flink (checkpoints) 5-10 seconds Bar width = recovery time. Transparency shows growth with state size. Replay scales with changelog. Checkpoints stay close to constant.

Processing engines like Apache Flink use checkpoint-based recovery. Benchmarks routinely show recovery in seconds even with large state.

2. Exactly-once semantics are narrower than most assume

Kafka's exactly-once is scoped to read-process-write within Kafka. The read and process phases are still at-least-once.

"Using transactions enables Exactly Once Semantics (EOS) ... (The read and process have at least once semantics)."

Spring Kafka: Exactly Once Semantics

Once your pipeline writes to databases, calls APIs, or touches external systems, you need idempotency and deduplication. Kafka transactions do not extend across system boundaries.

Kafka transaction boundary (exactly-once here) Read Process Write to Kafka Outside Kafka (at-least-once) Database API call You handle idempotency here

The scalability side is documented too. Before Kafka 2.5, exactly-once required one transactional producer per input partition.

"The simplest solution is to create a separate producer for every input partition ... This architecture does not scale well as the number of input partitions increases."

Apache Kafka KIP-447

3. ksqlDB migration stories show the operational limits

ksqlDB made stream processing approachable through SQL. The hard part is running it long enough that schema changes, resource contention, and pipeline lifecycle become daily concerns.

Riskified published their migration story: schema evolution that required dropping and recreating streams, resource isolation issues on shared clusters, and the path to managed Flink.

"ksqlDB's approach to schema evolution didn't automatically incorporate newly added fields."

AWS Big Data Blog: Riskified's journey to Flink (May 2025)

The same story highlights isolation as a platform feature rather than an application responsibility.

"Managed Flink provides true job isolation by running each streaming application in its dedicated cluster."

AWS Big Data Blog

4. Vendors draw boundaries around broker-side processing

Redpanda's Data Transforms documentation is explicit about what broker-side processing should and should not do:

"Transforms have no external access to disk or network resources ... Only single record transforms is supported ... For aggregations, joins, or complex transformations, consider using ... Apache Flink ... Up to 8 output topics are supported ... Transforms have at-least-once delivery."

Redpanda docs: Data Transforms
Capability Broker transforms Processing engine Single-record transforms OK OK Joins and aggregations No OK External system access No OK Checkpoint-based recovery No OK Workload isolation No OK Exactly-once to external systems No OK
Broker-side transforms are intentionally limited. The boundary exists because brokers are not processing engines.

Confluent made a similar acknowledgment by acquiring Immerok to build a cloud-native Flink offering.

"Confluent signed a definitive agreement to acquire Immerok to accelerate the development of a cloud native Apache Flink offering."

Confluent press release (Jan 2023)

What this means in practice

Streaming platforms are built for durable transport: logs, ordering, fan-out, backpressure. They are not stateful compute engines with fast recovery, checkpoint coordination, and workload isolation.

When you couple transport and processing, scaling and recovery become coupled too. You cannot scale processing without scaling brokers. Compute costs get buried in messaging infrastructure.

Reference architecture: separated concerns Streaming Platform Durable log, ordering Kafka · AutoMQ · KafScale Processing Engine State, checkpoints, isolation Apache Flink · Spark Sinks Databases, lakes, APIs, warehouses Cross-engine orchestration (optional) Apache Wayang: run pipelines across Flink, Spark, other backends
Each layer does one thing well. Wayang orchestrates when pipelines span multiple engines.

The architecture that holds up under growth separates these concerns:

  • Kafka, AutoMQ, or KafScale for transport
  • Apache Flink for stateful stream processing
  • Apache Wayang when pipelines need to run across multiple execution backends

"Apache Wayang aims at decoupling the business logic of data analytics applications from concrete data processing platforms, such as Apache Flink or Apache Spark."

Apache Wayang

Lightweight transformations inside the streaming layer still make sense: filtering, format normalization, simple enrichment. That work belongs close to transport when it stays simple.

Core business logic with state, joins, and external writes does not. That belongs in a processing engine designed to checkpoint state, isolate workloads, and recover predictably.

Where KafScale fits

We built KafScale around this boundary. A streaming platform should focus on transport and durability, running as stateless, schedulable infrastructure rather than embedded compute.

The design keeps brokers free of local state and avoids embedding processing into the broker fleet. Processing belongs in Apache Flink or wherever your workloads need it.

Architecture and docs: kafscale.io
Source: github.com/novatechflow/kafscale

Sources

If you need help with distributed systems, backend engineering, or data platforms, check my Services.

Most read articles

Why Is Customer Obsession Disappearing?

Many companies trade real customer-obsession for automated, low-empathy support. Through examples from Coinbase, PayPal, GO Telecommunications and AT&T, this article shows how reliance on AI chatbots, outsourced call centers, and KPI-driven workflows erodes trust, NPS and customer retention. It argues that human-centric support—treating support as strategic investment instead of cost—is still a core growth engine in competitive markets. It's wild that even with all the cool tech we've got these days, like AI solving complex equations and doing business across time zones in a flash, so many companies are still struggling with the basics: taking care of their customers. The drama around Coinbase's customer support is a prime example of even tech giants messing up. And it's not just Coinbase — it's a big-picture issue for the whole industry. At some point, the idea of "customer obsession" got replaced with "customer automation," and no...

How to scale MySQL perfectly

When MySQL reaches its limits, scaling cannot rely on hardware alone. This article explains how strategic techniques such as caching, sharding and operational optimisation can drastically reduce load and improve application responsiveness. It outlines how in-memory systems like Redis or Memcached offload repeated reads, how horizontal sharding mechanisms distribute data for massive scale, and how tools such as Vitess, ProxySQL and HAProxy support routing, failover and cluster management. The summary also highlights essential practices including query tuning, indexing, replication and connection management. Together these approaches form a modern DevOps strategy that transforms MySQL from a single bottleneck into a resilient, scalable data layer able to grow with your application. When your MySQL database reaches its performance limits, vertical scaling through hardware upgrades provides a temporary solution. Long-term growth, though, requires a more comprehensive approach. This invo...

What the Heck is Superposition and Entanglement?

This post is about superposition and interference in simple, intuitive terms. It describes how quantum states combine, how probability amplitudes add, and why interference patterns appear in systems such as electrons, photons and waves. The goal is to give a clear, non mathematical understanding of how quantum behavior emerges from the rules of wave functions and measurement. If you’ve ever heard the words superposition or entanglement thrown around in conversations about quantum physics, you may have nodded politely while your brain quietly filed them away in the "too confusing to deal with" folder.  These aren't just theoretical quirks; they're the foundation of mind-bending tech like Google's latest quantum chip, the Willow with its 105 qubits. Superposition challenges our understanding of reality, suggesting that particles don't have definite states until observed. This principle is crucial in quantum technologies, enabling phenomena like quantum comp...