Technology

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.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

2 min read

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.

Mentioned in this story

Markets

Coinbase Global, Inc.NASDAQ:COIN

Sources

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

TopicsDatabricksApache SparkSpark StreamingReal-Time ProcessingFraud DetectionMachine LearningLakebasePostgreSQL

StartupHub.ai StaffDaniel SingerWritten by StartupHub.ai Staff, Editorial teamReviewed by Daniel Singer, EditorAbout

StartupHub.ai Staff, Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer, Editor

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

More from Daniel Singer

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

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.