Mid-level Backend Engineer at a SaaS business management platform for MSMEs, focused on cost calculation systems and performance profiling. [Golang, Kafka].
Majoo Indonesia is a SaaS-based business management platform offering POS (Point of Sale), accounting, inventory, CRM, and employee management solutions for MSMEs.
Cost of goods sold has to be recalculated on every transaction, purchase, or stock adjustment. Running that synchronously in the request path would be expensive, so the work was moved onto Kafka Pub/Sub to let the calculation run asynchronously without blocking user transactions.
The merchant’s sale is recorded and answered straight away. The same API publishes an event, and the COGS worker picks it up on its own pace, so the cost figures catch up without the cashier ever waiting on them.
Profiling with pprof is what made the memory leak findable in the first place: reading heap allocations with top and list, watching GC cycles through GODEBUG=gctrace=1, and confirming the fix with load testing before and after. I wrote up the full technique afterwards: