AI Briefing
KO

Kakao Releases 'Carib' v2 Real-Time Messaging System… Minimizes Redis Load and Enhances Performance

·2024.12.12 00:00

Key point

Carib v2 reduces Redis load to less than 1% and processes 600,000 messages per second without loss on a 2-core VM.

1 / 9

Details

Kakao released version 2 of Carib, a general-purpose real-time messaging system built in Go, sharing the development process and performance improvement results. The existing live servers aimed for 10K connections per server but suffered from poor scalability due to excessive resource usage and domain coupling, with message loss occurring starting at 2,000 connections.

Carib v2 Architecture and Performance Improvements

Carib v2 focused on minimizing Redis load and distributing the load to Carib servers themselves. While v1 concentrated load on Redis through periodic polling, v2 eliminated unnecessary internal polling by utilizing Redis Streams and the Singleflight pattern. As a result, Redis CPU usage in the same traffic environment dropped significantly from 15% in v1 to less than 1%.

Performance test results showed that on a VM with 2 cores/4GB specifications, maintaining 5,000 connections and transmitting 50 messages per second resulted in a 0% loss rate for both SSE and WebSocket. This figure demonstrates stability while reducing memory usage to around 200MB compared to v1.

Real-World Operations and Scalability

Additional load tests confirmed that 600,000 messages per second were delivered without loss even in an environment with 6,000 connections. During actual service operations, approximately 40,000 concurrent users flooded a single channel during the Paris Olympics archery finals in August 2024, but the system successfully delivered hundreds of messages per minute, proving its stability.

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.