cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Mode in Apache Spark Structured Streaming

Yogesh_Verma_
Contributor

Real-Time Mode in Spark Streaming

Apache Spark™ Structured Streaming has been the backbone of mission-critical pipelines for years — from ETL to near real-time analytics and machine learning.

Now, Databricks has introduced something game-changing: Real-Time Mode – a new trigger type that processes events as soon as they arrive, with latencies in the tens of milliseconds.

This opens the door for ultra-low-latency use cases like fraud detection, live personalization, and real-time ML feature serving, all without rewriting your existing code.

Existing Trigger Modes in Structured Streaming

Before Real-Time Mode, Spark offered three main trigger types:

  • Processing Time Trigger

  • Trigger Once 

  • Available Now 

These worked well for micro-batch processing but still introduced some delay.

What is Real-Time Mode?

Real-Time Mode introduces continuous, low-latency processing in Spark Structured Streaming.

  • p99 latency as low as single-digit milliseconds

  • Works with the same Structured Streaming APIs you already use

  • Just a single configuration change needed – no re-platforming

Real Time mode Internal Benchmark

Yogesh_378691_1-1759318181584.png

Real-World Use Cases

Some exciting examples where Real-Time Mode shines:

  • Fraud Detection (Banking): Flag suspicious transactions from Kafka streams in under 200 milliseconds 

  • Personalized Retail Experiences: Update recommendations or product offers in real time.

  • Travel & Search Apps: Instantly update search history/session state across devices.

  • Food Delivery Apps: Update ML features like driver location in milliseconds, improving ETA accuracy.

  • Payments Authorization (Network International): Achieved 15 milliseconds latency for mission-critical payment flows

Explore More - Real-Time Mode in Apache Spark™ Structured Streaming

Yogesh Verma
0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now