Backend Development 7 min read

Architecture Overview of QQ Album: Storage, Indexing, Compression, and Global Distribution

QQ Album, storing over 2 trillion images across 300 PB, uses a distributed KV store, high‑performance compression (WebP, sharpP), regional “parks” with synchronized indexes, multi‑region disaster recovery, and a nationwide CDN to deliver low‑latency uploads and downloads for billions of daily user interactions.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Architecture Overview of QQ Album: Storage, Indexing, Compression, and Global Distribution

QQ Space (QZone) has been accompanying users for nearly 12 years, and QQ Album now stores over 2 trillion images (approximately 300 PB of physical storage). The service sees an average daily increase of 300 million images and 500 billion user views, making it the largest photo album product in China and one of the biggest worldwide.

The backend system has evolved from a simple MySQL index + Linux file system to a sophisticated architecture built by Tencent's Architecture Platform Department, incorporating distributed KV storage, high‑performance compression, and multi‑region deployment.

The index system stores users' album lists and the list of images within each album, while the file system holds the actual image files. Initially, the system used MySQL for user indexes and a Linux file system for image storage, which sufficed for a small user base.

As the number of users and requests grew rapidly, the team developed a custom storage family based on the TFS KV engine, culminating in the TSSD platform—a distributed key‑value store built on large‑capacity SSDs. TSSD provides multi‑replica reliability, a proprietary persistent engine that overcomes random‑write bottlenecks, and delivers mixed read/write performance with peak IOPS exceeding 100 k per node. Latency spikes are controlled so that 99.9 % of operations complete within 10 ms.

To further optimize, the index data is split into lightweight list information and heavyweight detail information, reducing the average size of index reads/writes.

QQ Album supports common image formats (JPG, PNG, GIF) and continuously adopts higher‑compression formats. WebP is fully supported, saving about 30 % of storage and bandwidth compared to JPG, and the internally developed sharpP format reduces size by an additional 15 %.

Handling massive concurrent compression requests requires a cluster of several thousand machines, most of which run Docker containers alongside other services to cut costs. For latency‑sensitive scenarios, FPGA‑based compression cards are used, achieving processing times only 10 % of those on CPU machines. This compression capability is also offered as a cloud service.

The system logically partitions over a billion album users into multiple "parks" (regional clusters), each with a complete set of services. Parks can be scaled smoothly and added on demand.

To ensure index consistency, a user's full index is stored in a single designated park. When a user uploads from a different region, the system routes the upload to the nearest park for the image data while synchronizing the index to the authoritative park, greatly improving upload success rates and reducing latency.

In case of network failures in a park, data and indexes are written to backup points, forming a ring‑shaped backup relationship among parks for cross‑region disaster recovery.

For download acceleration, more than 30 CDN nodes are deployed across the country, plus additional nodes in Hong Kong and the United States, providing fast access for both domestic and overseas users.

Based on user behavior analysis, newly uploaded images receive the highest access frequency. After an upload, the system proactively sends commands to CDN nodes to pre‑fetch and cache these images, enabling instant loading for friends viewing the photos without needing to fetch from the origin.

The team continues to work on improving service quality and stability, ensuring that users can safely and conveniently record their lives with QQ Album.

backend architectureimage compressionDistributed storageKV StoreCDN accelerationQQ Album
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.