Lambda Architecture in Banking Systems – Balancing Batch and Stream

Lambda Architecture in Banking Systems – Balancing Batch and Stream

Building on our discussion of Kappa Architecture, we now turn our attention to Lambda Architecture, a data-centric design that laid much of the groundwork for modern big data systems. Although it has been somewhat overshadowed by Kappa’s simplicity, Lambda remains relevant in certain banking scenarios where both batch accuracy and real-time responsiveness are critical.

What is Lambda Architecture?

Lambda Architecture, proposed by Nathan Marz, is a design pattern for processing massive datasets by combining batch and streaming processing. Its goal is to deliver low-latency results while also ensuring correctness and completeness by periodically recomputing data.

It achieves this with three layers:

  • Batch Layer: Stores all historical data immutably and computes the master dataset.
  • Speed Layer (Stream): Processes data in real-time to provide immediate results.
  • Serving Layer: Combines outputs from both batch and speed layers and makes them queryable.

Why Lambda Matters in Banking

Banking systems often face the dual requirement of:

  • Processing vast amounts of data (e.g., years of transactions) for reporting, compliance, and analytics.
  • Reacting instantly to new events for fraud detection, balance updates, or customer notifications.

Lambda addresses this by letting you:

  • Use the batch layer to generate highly accurate and complete views of the data.
  • Use the speed layer to fill the gap between batch runs with real-time approximations.
  • Present a unified view through the serving layer.

Real-World Use Cases in Banking

  • Regulatory Reporting: Batch layer recomputes complete reports overnight while the speed layer delivers near-real-time updates during the day.
  • Fraud Detection: Speed layer detects suspicious activity immediately, while batch layer provides comprehensive analysis and refinement.
  • Customer Dashboards: Balances and transactions appear instantly via the speed layer, but are corrected (if needed) after batch processing.

Benefits of Lambda Architecture


  • Combines the accuracy of batch processing with the immediacy of streaming.
  • Resilient to data loss or corruption thanks to the immutable master dataset.
  • Scales horizontally for both large historical datasets and high-velocity streams.

Challenges and Considerations


  • Complexity: Maintaining two separate codebases (batch + stream) can double the development and maintenance effort.
  • Consistency: Reconciling batch and speed layers can introduce delays or complexity in handling corrections.
  • Latency of Batch Layer: Batch processing is inherently slower, so the system depends on the speed layer for immediacy.

Closing Thoughts


Lambda Architecture introduced a powerful way to reconcile real-time and historical data needs, particularly valuable for banks managing strict compliance and immediate customer interactions. However, its complexity has led many to consider Kappa as a simpler alternative when a batch is unnecessary.

In the next article, we’ll move into the concurrency category and explore Orchestration Architecture, where the coordination of concurrent processes becomes the centerpiece of system design.

Stay tuned as we continue mapping the architectural landscape for modern banking systems.

درود با توجه به پیچیدگی معماری lambda و هزینه های زیرساخت بالاتر اون، معماری kappa به عنوان جایگزین پیشنهاد میشه و تنها در batch processing باید مسیر دیگه ای را انتخاب کرد ارادت

You could use Flink for both batch and stream:)

واقعیتش دیگه معماری هایی مثل lambda و kappa قدیمی شده و از نظر cost و performance توجیه نداره ،نمونش consistent بودن storage ها و یا data duplication و..دردسرهای خاص خودش چون رو داره در عوض ابزارهایی مثلbeam و streaming lakehouse ها باعث ساده سازی معماری میشه و نیاز رو به این معماری ها از بین میبره

To view or add a comment, sign in

More articles by Farzad Sedaghatbin

Others also viewed

Explore content categories