Kakao Publishes Performance Optimization Report for Real-Time Messaging System 'Carib'
Key point
Buffering and marshaling optimizations using gobwas reduce message loss rate by 60% and CPU usage by 25%
Details
The development team for Kakao's real-time messaging system 'Carib' has published a report on its performance optimization process. Through pprof analysis, they identified network I/O and internal message delivery processes as bottlenecks. To address the system call overhead of TCP_CORK, they applied the buffering feature of the gobwas library, modifying the system to flush data every 50ms. Additionally, they optimized message marshaling, which was previously duplicated for each recipient, to be performed only once during the Delivery stage, reducing CPU usage by approximately 25%. Replacing the JSON library with goccy/go-json improved the loss rate by 2.5%, and modifying the logic to execute callback functions in separate goroutines reduced the message loss rate by approximately 60% compared to before. Furthermore, they analyzed Go language memory management characteristics such as Heap Escape and Zero Allocation to identify optimization points.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.