Announcing General Availability of Real-Time Mode for Spark Declarative Pipelines on Databricks
TL;DR · AI 摘要
Databricks推出Spark Declarative Pipelines的实时模式(RTM),实现毫秒级延迟,性能比Flink快92%。
核心要点
- RTM实现端到端毫秒级延迟,适用于欺诈检测等实时场景
- RTM性能比Flink快92%,消除微批处理架构的100倍延迟
- SDP统一了批处理、ETL和低延迟流处理框架
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- Spark RTM架构
- 核心优势
- 毫秒级延迟
- 92%性能提升
- 应用场景
- 欺诈检测
- 实时推荐
- 框架整合
- 统一批处理/ETL/流处理
- 替代Flink
金句 / Highlights
值得收藏与分享的关键句。
RTM实现端到端毫秒级延迟,消除微批处理架构的100倍延迟
RTM在实际客户工作负载中比Flink快92%,基准测试数据可查GitHub
SDP自动处理依赖解析、增量处理和故障恢复,保留所有SDP优势
Announcing General Availability of Real-Time Mode for Spark Declarative Pipelines on Databricks | Databricks Blog
Skip to main content
Platform
October 29, 2026
Announcing General Availability of Real-Time Mode for Spark Declarative Pipelines on Databricks
Bring sub-second latency to your most time-critical operational workloads with declarative flows and sinks
by Jerry Peng , Abhay Bothra , Sudhanva Huruli , Navneeth Nair , Anant Pingle and Murali Talluri
Summary
- Announcing General Availability of Real-Time Mode (RTM) on Spark Declarative Pipelines (SDP), delivering end-to-end processing latencies in the millisecond range for operational streaming workloads.
- Real-Time Mode eliminates the need for separate specialized engines such as Apache Flink, unifying batch, ETL, and low-latency streaming under a single framework.
- Real-Time Mode enables real-time computation and instant writes to operational stores via ForEach sinks, powering time-critical use cases like fraud detection and live personalization.
We introduced Real-Time Mode (RTM) last year which enabled customers to build low-latency, operational use cases. This was a game changer because it allowed customers to process streaming data in milliseconds, up to 100x faster than traditional micro-batch architecture. Furthermore, they no longer needed to maintain separate, specialized engines like Flink alongside Spark, eliminating duplicate codebases, fragmented governance models, and operational overhead.
Today, we are announcing RTM in Spark Declarative Pipelines (SDP) is now Genearally Available. SDP has become the standard way to build streaming and ETL pipelines on Databricks, automatically handling dependency resolution, incremental processing, orchestration, failure recovery, and data quality enforcement. With RTM, customers can build operational, low-latency pipelines while retaining all of those SDP benefits. Whether for fraud scoring, real-time alerting, or pushing fresh features to operational stores, you can now use SDP across all of these use cases.
What Is Real-Time Mode (RTM)?
RTM is an evolution of the Spark Structured Streaming engine that achieves end-to-end latencies in the millisecond range. It does this by streaming data continuously, running all query stages simultaneously, and passing data between stages as soon as it is produced. For the full architecture deep dive, read the blog, “ Breaking the microbatch barrier: The architecture of Apache Spark Real-Time Mode .”
RTM can support any workload that benefits from turning data into decisions in milliseconds. Some example use cases include fraud detection, live personalization, real-time recommendation systems, and real-time feature computation. We benchmarked RTM against Apache Flink on actual customer workloads performing feature computation, and RTM is up to 92% faster than specialized engines like Flink. Below are the benchmarks. For more information on the datasets and queries referenced, see this GitHub repository .
Why RTM on Spark Declarative Pipelines
Customers are increasingly defaulting to SDP for their ETL workloads. With RTM, SDP now supports all streaming workloads, including operational low-latency streaming, enabling customers to use a single framework across all pipelines. One framework means one observability stack, one billing model, and no fragmentation across different APIs.
SDP serverless takes it further. There is no compute to choose and no cluster to size. You get sub-second latency, without any complex infra tuning, while paying only for the cores your query uses. RTM flows also get SDP features such as versionless upgrades and low-downtime maintenance, which reduce both the operational work and the disruption of upgrades.
One use case where RTM on SDP has immediate impact is real-time feature computation. ML models for fraud detection or personalization depend on fresh signals, such as a user's total transaction amount over the last 10 minutes, to make accurate predictions. Computing these rolling-window aggregations and landing them in an online store within milliseconds is where RTM on SDP closes the gap. The Databricks Feature Store uses this exact architecture to deliver end-to-end p99 latency of 200ms from Kafka to the online feature store .
Getting started with RTM on SDP
Step 1: Configure the pipeline
Real-Time Mode requires the pipeline mode to be continuous and spark.databricks.streaming.realTimeMode.enabled set to true takes over.
$
/$
Step 2: Define a real-time update flow
Real-time mode requires an update flow. Use dp.create_sink() to define the output target, then use the @dp.update_flow decorator with pipelines.trigger set to "RealTime" and target pointing to the sink.
For supported sources and sinks, see the documentation .
Writing features to any custom sink
Use cases like fraud detection or real-time personalization require not only that features be computed in real time but also that they land in a queryable, low-latency store. A fraud model needs a customer's latest transaction before it clears, and a personalization engine needs to read what a user just browsed.
Today, you can write to any custom sink like Lakebase , Redis, or any other OLTP store from SDP using a ForEach sink . Define the writer, register it as a foreach_sink , and wire it to an update_flow .
Features land in your operational store within milliseconds of being produced, with no offline-to-online sync in between. Applications and models can query them at ultra-low latency. What’s next for RTM on serverless?
- Running RTM pipelines at lower cost: Bin-pack multiple RTM flows into a single pipeline instead of each query standing up its own resources. The system also auto-tunes source and shuffle partitions based on workload, so users skip manual sizing.
- Expanded sink support: Native Lakebase sink for SDP, with built-in batching, automatic retries, and UC-managed authentication.
Conclusion
RTM extends Spark Declarative Pipelines into a new class of workloads, operational, latency-sensitive applications that demand immediate response to streaming data. By bringing sub-second latency to the SDP APIs your team already uses, it eliminates the need to operate a separate framework or engine for your most time-critical pipelines. Whether you're building fraud detection pipelines, personalization engines, or ML feature computation systems, real-time mode gives you the latency your application demands with the simplicity of SDP.
Real-Time Mode on Spark Declarative Pipelines is now Generally Available.
Technical Resources
Check out the following resources to get started with RTM on SDP:
- Documentation: Use Real-Time Mode on Lakeflow pipelines
- Documentation: Connect to Lakebase streaming sink
- Documentation: Use a ForEach sink to write each row in pipelines
- Code examples: Real-Time Mode on SDP examples
FAQ
What is Real-Time Mode (RTM) in Spark Declarative Pipelines?
Real-time mode (RTM) lets Spark Declarative Pipelines (SDP) process streaming data with end-to-end latency in the millisecond range. It streams data continuously, runs all query stages at the same time and passes data between stages as soon as it's produced. Real-time pipelines benefit from SDP's orchestration and automatic failure recovery.
Is Real-Time Mode available in Spark Declarative Pipelines?
Yes. Real-time mode on Spark Declarative Pipelines is now generally available. It brings the real-time mode already available in Spark Structured Streaming to SDP pipelines.
How do I turn on real-time mode in a pipeline?
Set the pipeline to continuous mode and set spark.databricks.streaming.realTimeMode.enabled to true . Then define an update flow with pipelines.trigger set to "RealTime" and a target that points to a sink.
Can a real-time pipeline write to Lakebase or another OLTP store?
Yes. Define a ForEach sink with a writer that implements open , process and close , then point a real-time flow at it. This works for Lakebase, Redis or any other OLTP store.
What use cases is Real-Time Mode in Spark Declarative Pipelines built for?
Real-Time Mode is built for operational workloads that turn streaming data into decisions in milliseconds. Examples include fraud detection, live personalization, real-time recommendations and real-time feature computation. The Databricks feature store uses this architecture to reach a p99 latency of 200 ms from Apache Kafka to the online feature store.
Related tags:
Data Streaming , Data Engineering and Announcements
Get the latest posts in your inbox
Subscribe to our blog and get the latest posts delivered to your inbox.
Sign up
View all blogs
slice-start id="_gatsby-scripts-1"
slice-end id="_gatsby-scripts-1"