Optimization: controlled batch processing system

Sumeet More
1 min readSep 11, 2022

--

Disclaimer: This article is based on my current knowledge and understanding. If you have any query or see any improvement, please mention in the comment section.

This is a micro blogpost on optimization. When designing a system if we support controlled batch processing instead of making another system call our system multiple times in parallel, we can have performance gain

Example: Imagine you are designing a microservice which has two endpoints. One endpoint supports controlled batch processing and the other one doesn’t. So the client which is consuming your controlled batch processing microservice endpoint, just has to call that endpoint once and pass the batch request whereas if client consumes microservice endpoint which doesn’t support controlled batch processing , has to do multiple parallel calls for the same task. Due to this, controlled batch processing microservice endpoint will outperform compared to other one. This is due to network IO overhead.

Below is one such example where controlled batching system got 50% performance gain

Note: I am using term controlled batch processing purposely because we don’t want to design system which might be overwhelmed due to size of batch during batch processing.

~ Happy Coding

--

--

Sumeet More

Software Engineer 2 at Microsoft | Backend Engineer and Architect| Blockchain & ML enthusiast | C#,.NET Core, Rust, Javascript and Go