NEW
A streaming approach that processes incoming data in small, discrete time-based batches for near-real-time computation.
DESCRIPTION
Micro batch processing discretizes continuous streams into small intervals, aggregating events and processing them as frequent mini-batches. It balances throughput and latency by leveraging batch execution engines for streaming workloads. Spark Streaming’s DStreams and Spark Structured Streaming’s micro-batch mode popularized this model. Typical configurations tune trigger intervals, checkpointing, and state stores to achieve desired SLAs. It contrasts with record-at-a-time engines that process each event individually for lower latency.
ALTERNATIVE DEFINITIONS
Apache Spark
Spark Streaming divides the data stream into batches, which are then processed by the Spark engine to generate the final stream of results in batches.
Explains discretization of streams into batches as the core operational model.
Apache Spark
In micro-batch mode, the engine processes data in small batches at a configurable trigger interval.
Highlights configurable triggers and the small-batch execution model for streaming.
RELATED TERMS
Stream Processing Spark Structured Streaming DStreams Windowing Delays Trigger Interval Exactly-Once Processing Backpressure Lambda Architecture Delta Lake
COMPETING TERMS
Record-at-a-time Streaming Batch Processing
RELATIONS
- Broader: Batch Processing
KNOWLEDGE AREAS
Real-time & Streaming Data Data Engineering
TARGET AUDIENCE
Data Engineer Software Developer MLOps Engineer Cloud Architect
EXTERNAL SOURCES
- Wikipedia - Apache Spark
- Apache Spark - Structured Streaming micro-batch mode details
- Apache Spark - DStreams model introduction
- Apache Flink - Contrasting continuous processing model
TOP QUESTIONS
When should you use Micro Batch Processing?
Use it when near-real-time latency suffices and you prefer batch engine reliability and tooling for streaming workloads.
Category: Usage
How does Micro Batch Processing differ from true streaming?
Micro-batch groups events into small intervals; true streaming processes records individually, achieving lower latencies with different runtimes.
Category: Comparison
What are typical Micro Batch Processing latencies?
Latencies commonly match the trigger interval, ranging from sub-second to several seconds, depending on workload and configuration.
Category: Overview
What are common mistakes with Micro Batch Processing?
Setting trigger intervals too low for heavy operations can cause backlogs; tune resources and batch sizes carefully.
Category: Mistakes
How does checkpointing work with Micro Batch Processing?
Checkpoints persist offsets and state between mini-batches, enabling recovery and exactly-once semantics with idempotent sinks.
Category: Requirements
Can Micro Batch Processing achieve exactly-once?
Yes, with transactional sinks, idempotent writes, and correct checkpointing, micro-batch engines can ensure exactly-once outcomes.
Category: Reassurance
What frameworks support Micro Batch Processing?
Spark Structured Streaming and legacy DStreams are the best-known micro-batch frameworks; others primarily favor record-by-record processing.
Category: Tools
How does Micro Batch Processing impact costs?
Batching can improve throughput and efficiency, but overly frequent triggers increase overhead; balance interval with compute usage.
Category: Costs
How to tune Micro Batch Processing performance?
Adjust trigger intervals, optimize joins and aggregations, manage state size, and scale executors to meet SLA targets.
Category: Best practices