← Blog

Stateful real-time now belongs in Spark 4.3, not a second streaming engine

Apache Spark 4.3 landed in Databricks Runtime 19 with stateful Real-Time Mode — streaming aggregation, dropDuplicates, and transformWithState under sub-150 ms P99 on three vendor benchmarks — plus SCD Type 2 Auto CDC and Project Feather for small-data iteration.

Data EngineeringLakehouseStreaming

Fraud counters, session personalization, and device monitors need both millisecond latency and keyed state. Teams that already standardized on Structured Streaming still split those workloads onto a second engine when state was missing from the low-latency path.

Databricks announced Apache Spark 4.3 in Databricks Runtime 19 on November 5, 2026, with stateful Real-Time Mode as the headline: streaming aggregation, `dropDuplicates`, and Scala/Java `transformWithState` now run in Structured Streaming’s low-latency execution mode. On the three representative stateful benchmarks in SPARK-58884, vendor-reported P99 end-to-end latency stayed under 150 ms (136 ms dedupe, 139 ms window aggregation, 141 ms `transformWithState`) — measurements for those workloads, not a blanket SLA. Under the hood, Spark 4.3 adds concurrent stage scheduling and pipelined / streaming shuffle (`PipelinedShuffleDependency`, `StreamingShuffleManager`) so producer and consumer stages run together instead of materializing a blocking shuffle. The same release ships SCD Type 2 Auto CDC through Python, SQL, and Spark Connect (`__START_AT` / `__END_AT` history), Project Feather opt-in shuffle-free single-task execution for eligible small single-partition queries, Arrow-native Dataset caching, and a move to a quarterly Spark feature-release cadence.

What platform leads should require before collapsing the Flink-or-equivalent sidecar for stateful hot paths:

  • Prove each candidate pipeline on aggregation, dedupe, and custom state operators under Real-Time Mode — do not assume micro-batch semantics still apply
  • Keep durability on Spark’s state store and checkpoints; treat pipelined stage groups as fail-together units when sizing slots
  • Use SCD Type 2 Auto CDC for audit/history tables instead of hand-rolled merges when the open engine already encodes the pattern

Stateful millisecond streaming that stays on one API is how lakehouse estates stop paying dual-ops tax. Spark 4.3 is the open release that makes that case concrete.