← Back to list

Why Batch Processing Still Powers Modern Data Platforms

When discussing large-scale data systems, the conversation often gravitates toward real-time processing, Kafka streams, low-latency APIs…

Smriti Shaw · 2026-06-05 12:29 · 0 claps · 6.7 min read
#distributed-systems #batch-processing #apache-flink #apache-spark
Open on Medium ↗
Wiki topics: 🔧 · Data Engineering

Why Batch Processing Still Powers Modern Data Platforms

Generated by AI

Generated by AI

When discussing large-scale data systems, the conversation often gravitates toward real-time processing, Kafka streams, low-latency APIs, and instant recommendations. The industry has become obsessed with milliseconds.

But here’s an interesting observation: some of the most important systems in modern technology aren’t optimized for real-time processing at all.

Think about recommendation engines, revenue reporting platforms, ad analytics systems, fraud detection pipelines, or machine learning training datasets. While these systems may leverage real-time components, their foundation is often built on something far less glamorous but incredibly powerful: batch processing.

In fact, one of the most common mistakes engineers make during system design discussions is assuming that every problem requires a real-time solution.

Imagine you’re asked to design a recommendation platform, a daily revenue reporting system, or an ads aggregation service. The instinctive response is often to reach for Kafka, stream processors, real-time databases, and low-latency serving layers. The resulting architecture looks sophisticated and may be capable of producing results within milliseconds.

However, such a design can still miss the mark.

The reason is simple: the best technical solution is not always the best business solution.

Take a daily revenue reporting system as an example. The business rarely cares whether the report is generated in 100 milliseconds or 10 minutes. What matters far more is:

  • Accurate financial calculations
  • Deduplication of events
  • Handling late-arriving data
  • Support for historical backfills
  • Auditability and reconciliation
  • Cost-efficient processing at scale

Similarly, most recommendation systems don’t generate every recommendation in real time. Candidate recommendations are often computed offline using large-scale batch jobs and refreshed periodically. Real-time services then focus on ranking, filtering, and personalization based on the latest user context.

In these situations, a fully real-time architecture can introduce significant operational complexity and infrastructure costs while delivering little additional business value.

This is where batch processing shines.

Despite receiving less attention than streaming architectures, batch processing remains one of the most widely used paradigms in distributed systems. From generating personalized recommendations and calculating business metrics to detecting fraud patterns and preparing machine learning datasets, batch systems continue to form the backbone of modern data platforms.

In this article, we’ll explore what batch processing systems are, why they continue to be relevant in the era of real-time computing, how they work internally, and where they fit within modern distributed architectures.

What is Batch Processing?

Batch processing is a method of collecting data over a period of time and processing it together as a single unit, or “batch.”

Instead of processing events immediately as they arrive, the system stores them and processes them periodically.

Imagine an e-commerce platform receiving millions of user clicks every hour. Rather than calculating analytics for every click in real time, the platform may store all events in a data lake and run a job every hour to compute:

  • Most viewed products
  • Conversion rates
  • Revenue metrics
  • Customer behavior patterns

This periodic computation is batch processing.

Why Not Process Everything in Real Time?

Real-time systems sound appealing, but they come with significant complexity and cost.

Many business problems don’t require millisecond-level responses.

Consider the following use cases:

  • Daily revenue reports
  • Weekly engagement metrics
  • Recommendation model training
  • Data warehouse ETL pipelines
  • Fraud trend analysis

Would the business gain much value if these were available in 50 milliseconds instead of every hour? Usually not.

Batch systems trade latency for simplicity, throughput, and cost efficiency.

Anatomy of a Batch Processing System

A typical batch processing architecture looks like this:

Applications
      |
      v
  Event Stream
      |
      v
 Data Storage (S3/HDFS)
      |
      v
 Batch Processing Engine
      |
      v
 Processed Data Store
      |
      v
 Dashboards / APIs / ML Models

1. Data Ingestion

Data originates from various sources:

  • User activity logs
  • Application events
  • Transactions
  • Sensor data
  • Database snapshots

These events are typically ingested through messaging systems such as Kafka. In cases where external systems need to notify us about an event, for example, a payment confirmation from a payment provider , the data may first arrive via a webhook. Regardless of the source, events are usually persisted to durable storage before undergoing downstream batch processing.

2. Storage Layer

Batch systems are built around durable storage, cost-effective place to store incoming events. Since batch jobs often need to reprocess historical data, the storage layer should support large-scale retention and replayability and must support horizontal scalability.

The goal at this stage is not fast querying but preserving the raw source of truth.

Common choices include:

  • Amazon S3
  • HDFS
  • Data lakes
  • Object stores

Unlike streaming systems that continuously process events in memory, batch systems rely on persisted data that can be reprocessed whenever needed.

3. Processing Engine

This is where the heavy lifting happens. Once data has been collected, batch jobs need to scan, aggregate, join, and transform large datasets efficiently.

Popular frameworks include:

  • Hadoop MapReduce : Break a large problem into smaller pieces (Map), process them in parallel, and then combine the results (Reduce). It was designed to process terabytes and petabytes of data stored in HDFS across hundreds or thousands of machines.
  • Apache Spark : The major problem with Hadoop MapReduce was that every stage writes intermediate data to disk. Apache Spark is a distributed data processing engine optimized for large-scale batch analytics and ETL workloads. It uses in-memory computation, lazy evaluation, DAG-based execution, and partitioned processing to efficiently handle terabytes or petabytes of data. Compared to Hadoop MapReduce, Spark significantly reduces disk I/O and provides a richer programming model for analytics, machine learning, and data engineering workloads.
  • Apache Flink (batch mode) : Apache Flink is a distributed data processing framework designed primarily for stream processing, although it also supports batch processing. Flink achieves exactly-once semantics by combining checkpointing with coordinated commits. During a checkpoint, Flink snapshots both operator state and source offsets. External sinks participate in the checkpoint process using a two-phase commit protocol. Data is first written in a temporary state and only committed when the checkpoint successfully completes. If a failure occurs before completion, the temporary writes are discarded and Flink restores from the last successful checkpoint, ensuring that each event affects the final result exactly once.

The processing engine reads large datasets, performs transformations, joins, aggregations, and writes results back to storage.

For example:

SELECT country, COUNT(*)
FROM user_events
GROUP BY country;

A batch engine can execute this query across billions of records distributed over hundreds of machines.

4. Output Layer

The processed results are written to serving systems such as:

  • Data warehouses
  • Relational databases
  • Elasticsearch
  • Feature stores
  • Analytics dashboards

Consumers can then query these optimized datasets instead of scanning raw data repeatedly.

How Parallel Processing Works

The real power of batch systems comes from parallelism.

Imagine you need to analyze 10 TB of user activity logs to generate a daily revenue report. Processing the entire dataset on a single machine would be slow and could take hours.

Instead, distributed processing frameworks such as Spark divide the data into smaller chunks called partitions.

10 TB Dataset
      |
      +---- Partition 1
      +---- Partition 2
      +---- Partition 3
      +---- Partition 4
      ...

These partitions are distributed across multiple worker machines in the cluster.

Worker 1 → Partition 1
Worker 2 → Partition 2
Worker 3 → Partition 3
Worker 4 → Partition 4

Each worker processes its assigned partition independently and simultaneously. Since all workers operate in parallel, the overall processing time can be dramatically reduced.

For example, instead of one machine processing 10 TB of data:

1 Machine
   ↓
Process 10 TB
   ↓
5 Hours

we can distribute the workload:

10 Machines
   ↓
Each processes ~1 TB
   ↓
~30 Minutes

(Actual performance depends on factors such as data distribution, network overhead, and computation complexity.)

Once individual workers finish their tasks, the framework combines the intermediate results to produce the final output.

For example, while generating a revenue report:

Worker 1 → Revenue = $100K
Worker 2 → Revenue = $120K
Worker 3 → Revenue = $90K
Worker 4 → Revenue = $140K

The system aggregates these partial results:

Total Revenue = $450K

This divide-and-conquer approach is what enables modern batch processing systems to efficiently process terabytes and even petabytes of data. The larger the dataset grows, the more machines can be added to the cluster, allowing the system to scale horizontally rather than relying on a single, increasingly powerful server.

Challenges in Batch Systems

While batch processing is conceptually simpler than streaming, it introduces its own challenges.

Data Skew

Imagine a dataset partitioned by country:

US -> 80%
India -> 10%
Others -> 10%

One worker becomes overloaded while others finish quickly.

Good partitioning strategies are essential to avoid skew.

Shuffle Operations

Operations such as joins and aggregations require data movement across machines.

This network transfer, called a shuffle, is often the most expensive step in distributed processing.

Many Spark optimization techniques focus on reducing shuffle costs.

Fault Tolerance

What happens if a machine crashes while processing 5 TB of data?

Modern systems solve this through:

  • Checkpointing
  • Immutable input data
  • Task retries
  • Lineage-based recomputation

This allows failed tasks to restart without rerunning the entire pipeline.

Batch Processing in the Modern Data Stack

Today’s architectures often combine batch and streaming approaches.

A typical modern data platform may look like:

Kafka
   |
   +---- Real-Time Pipeline
   |         |
   |         +---- Fraud Detection
   |         +---- Alerting
   |
   +---- Batch Pipeline
             |
             +---- Data Lake
             +---- Spark Jobs
             +---- ML Training
             +---- Reporting

Streaming systems handle immediate actions.

Batch systems handle large-scale analytics and historical computation.

Together, they form the foundation of modern data engineering.

The next time you’re designing a large-scale data processing system, whether in a design review at work or during a system design interview, pause before reaching for Kafka streams, real-time processors, and ultra-low-latency architectures. Start by asking a simple question:

“How fresh does the data really need to be?”

If the business can tolerate a delay of a few minutes, hours, or even a day, a batch processing system may be a far simpler, more scalable, and more cost-effective solution. Great system design isn’t about building the fastest system possible; it’s about building the right system for the problem. Sometimes, the most elegant architecture is the one that embraces delay instead of fighting it.


메타데이터
post_id
3b8eb34af86c
slug
why-batch-processing-still-powers-modern-data-platforms-3b8eb34af86c
url
https://medium.com/@debugging-tale/why-batch-processing-still-powers-modern-data-platforms-3b8eb34af86c
canonical_url
https://medium.com/@debugging-tale/why-batch-processing-still-powers-modern-data-platforms-3b8eb34af86c
author_url
https://medium.com/@debugging-tale
status
ok
fetched_at
2026-06-09 15:37:30