Spark Streams Tackle Fraud in Milliseconds

Databricks' Spark Real-Time Mode and Lakebase offer a unified platform for sub-second fraud detection, eliminating complex infrastructure.

Diagram showing the architecture for real-time fraud detection using Databricks, Kafka, and Lakebase
An overview of the data flow for real-time fraud detection on Databricks.
Visual TL;DR
Digital Fraud SpeedDriver
fraudsters exploit stolen card details in seconds, making real-time intervention critical
From the articleFinancial institutions are racing to stop fraud before it happens, a challenge complicated by the sheer speed of digital transactions.
Complex InfrastructureDriver
bolting on separate streaming engines leads to duplicated systems and split governance
From the article 2 mentionsHowever, building and managing separate streaming infrastructure alongside existing data platforms creates duplicated systems, split governance, and increased engineering burden.
Spark Real-Time ModeCore
sub-second processing without the overhead of traditional streaming engines
From the article 2 mentionsDatabricks aims to simplify this with its new solution, combining Spark Real-Time Mode and Lakebase for end-to-end fraud detection on a single platform.
LakebaseCore
integrated Postgres for low-latency serving of fraud detection results
From the article 4 mentionsThe solution also leverages Databricks Lakebase, a fully managed, serverless PostgreSQL database embedded within the Databricks platform.
Unified PlatformContext
From the article 3 mentionsDatabricks aims to simplify this with its new solution, combining Spark Real-Time Mode and Lakebase for end-to-end fraud detection on a single platform.
Millisecond Fraud DetectionEffect
enabling financial institutions to stop fraud before it happens
From the articleDatabricks aims to simplify this with its new solution, combining Spark Real-Time Mode and Lakebase for end-to-end fraud detection on a single platform.
Simplified OperationsOutcome
eliminating complex infrastructure and reducing engineering burden
Contents(3)

Financial institutions are racing to stop fraud before it happens, a challenge complicated by the sheer speed of digital transactions. Traditional methods often involve slow batch processing or bolting on separate streaming engines, leading to operational complexity and delayed detection. Databricks aims to simplify this with its new solution, combining Spark Real-Time Mode and Lakebase for end-to-end fraud detection on a single platform.

The core problem is speed versus simplicity. Fraudsters can exploit stolen card details in seconds, making real-time intervention critical. However, building and managing separate streaming infrastructure alongside existing data platforms creates duplicated systems, split governance, and increased engineering burden. This dual system approach historically forced a choice between speed and operational ease.

Spark Real-Time Mode: Sub-Second Processing Without the Overhead

Spark Real-Time Mode (RTM) is an evolution of Spark Structured Streaming designed for latency-sensitive applications. It achieves sub-300ms stream processing, reportedly outperforming Apache Flink in key workloads and enabling companies like Coinbase to compute hundreds of ML features with sub-100ms latency. Crucially, RTM operates within the existing Spark engine, eliminating the need for separate streaming stacks. This unification prevents logic drift, as the same code used for offline training can be applied to real-time scoring. It also consolidates operational tooling and reduces on-call responsibilities.

This technology is a significant step towards achieving low-latency processing, as discussed in our coverage of Spark Streaming hitting millisecond latency.

Lakebase: Integrated Postgres for Low-Latency Serving

The solution also leverages Databricks Lakebase, a fully managed, serverless PostgreSQL database embedded within the Databricks platform. Lakebase acts as a low-latency serving layer for feature enrichment, providing context from merchant risk profiles and cardholder data. This avoids the latency typically associated with broadcast joins in streaming pipelines.

The architecture, demonstrated through a credit card transaction scenario, ingests data from Kafka, processes it using Spark RTM for parsing, velocity tracking, enrichment, and scoring. Decisions are then routed to approve, flag, or block transactions. End-to-end latency tests show P99 performance between 215-392ms, validating production readiness without external infrastructure.

Upgrading to Machine Learning

Beyond static rules, the solution integrates machine learning models. This upgrade allows for reduced false positives and adaptation to evolving fraud patterns. MLflow's experiment tracking and versioning provide necessary model lineage for regulatory compliance. Lakebase is continuously updated with per-card features, enabling dynamic model scoring.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.

Watch

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.

Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.