Payment processing

Parallel payment engine

A file-processing workflow required too much memory and took tens of seconds. The solution was not another queue, another broker or a larger heap.

30–50s → ~4s
Processing
10GB → ~2.5GB
Memory
~75% RAM
Reduction

Problem

The workload processed large settlement files through an allocation-heavy execution model. Memory demand exceeded the practical limit and processing time varied between roughly thirty and fifty seconds.

Investigation

Profiling showed excessive intermediate objects, avoidable copying and insufficient use of CPU parallelism. The limiting factor was the execution model, not Kafka throughput or storage bandwidth.

Design

Outcome

Processing fell to approximately four seconds and memory demand to about 2.5GB. The important result was not merely throughput. The workload became easier to size, reason about and operate.