AI Briefing
KO

Kakao: Evolution of the Architecture of Its In-House Distributed Web Cache 'Wcache'

·2017.10.23 00:00

Key point

Kakao's in-house developed Wcache achieves hundreds of thousands of TPS and a cache hit rate of over 95% with its SSD-HDD dual-layer architecture.

1 / 4

Details

Kakao developed its own C-based web cache, Wcache, to address the high licensing costs and limited feature improvements of commercial web cache solutions. Wcache delivers stable performance on general-purpose hardware (x86) by leveraging multithreading, I/O multiplexing, and DMA.

Proprietary Storage Structure

Since web cache performance depends on storage device I/O speed, Wcache adopted a proprietary storage method to overcome the limitations of file systems. It pre-creates BigFiles of 64MB to 10GB on disk to encourage sequential writes, and reduces the number of I/O operations by loading data into memory and writing to disk only in block units. Metadata is stored in an SQLite DB, while HTTP headers and some metadata are cached in an LRU hash table in memory to speed up access.

Evolution of Distributed Configuration

Initially, Wcache deployed nodes in parallel under a load balancer, but the round-robin method caused cache duplication, resulting in a low hit rate. To improve this, a cluster structure using consistent hashing was introduced to enhance cache efficiency, but this led to traffic concentration on specific popular content (hot items).

Dual Layer Architecture

To resolve the traffic skew issue, Wcache evolved into a dual-layer architecture. The first layer consists of equipment equipped with SSDs for fast responses, and the second layer consists of equipment equipped with HDDs for large-capacity storage. When a cache miss occurs in the first layer, requests are routed to the appropriate node in the second layer. This structure demonstrates high cache efficiency and performance in services with long-tail distributions, currently stably handling hundreds of thousands of TPS of traffic with a hit rate of over 95% in Kakao services.

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.