Introduction
As in a batch job huge no of records are processed, it faces performance bottlenecks sooner than later. Different performance bottlenecks that can be cited during batch job execution are long execution period, OutOfMemoryError, bad records which abort the job immediately etc. So while writing a real-time batch job, we have to be utmost careful and take these parameters into consideration. That will help us scale up the batch job properly.
Though there are various ways to scale up a batch job, here I shall show you how to scale up a Spring Batch job using local partitioning. Partitioning is a mechanism of dividing a step into multiple threads where each thread executes a chunk of data in parallel. Here original step is called Master while steps that execute through threads are called Slaves. Some programmers refer to it as Master-Slave approach. Again partitioning can be of two types, local and remote. Remote partitioning is beyond the scope of today's discussion.