Member-only story
“Why My Spring Batch Job Was Perfect — Until It Ran on Production”
💡 Angle:
Instead of a dry tutorial, this article tells a story — a tale of a developer deploying a batch job that worked in dev, CI/CD… but misbehaved in prod. Then we break down what went wrong, why it happens, and how to fix it — with side-by-side comparisons to what Spark or Airflow would do in that situation.
🧠 Structure:
1. The Setup
“Everything was working locally.”
Introduce the use case: ETL job using Spring Batch. Define chunks, readers, processors, writers — the usual suspects.
2. The Twist in Production
“The job took 3 hours instead of 15 mins.”
Introduce real-world problems:
- DB locking
- Skipping misconfigured rows
- Faulty parallel execution
- Out-of-memory errors
3. What We Thought vs. Reality
Compare theory with production truths:
What We Thought ➡️Chunked reading = fast