Operations 14 min read

Bandwidth Optimization Practices in Tencent Social Services

Tencent’s social services cut two hundred million RMB in bandwidth costs by flattening traffic peaks through seven practices—disabling auto‑play, pre‑pushing hot content, compressing media, offering on‑demand quality, using segmented downloads, applying technical breakthroughs like P2P and codec optimization, and filtering illegal content—while preserving user experience.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Bandwidth Optimization Practices in Tencent Social Services
Author bio: Liang Ding'an, currently working in Tencent Social Network Operations, responsible for social platform and value‑added service operations, member of the Open Operations Alliance expert committee, Tencent Cloud evangelist, and Tencent Classroom operations instructor.

The previous article summarized years of Tencent operations experience in capacity and device cost management, saving over a hundred million RMB in operating costs for the massive social business.

Bandwidth is one of the biggest components of IT operating costs. This article examines how Tencent’s social services, which rely heavily on rich media, have gradually squeezed out unreasonable bandwidth usage to save another two hundred million RMB.

Before diving into bandwidth‑optimization techniques, let’s first understand how carriers charge for bandwidth:

IDC and CDN bandwidth rental is priced in "RMB per M per month" and billed based on the average of the highest weekend values each month.

Knowing the pricing strategy allows us to apply appropriate technical or product measures for different business patterns, reducing peak‑time bandwidth while preserving user experience. In short, we aim to flatten the bandwidth peaks.

This article does not focus on converting IDC bandwidth to CDN bandwidth, because that merely shifts cost rather than reduces consumption. Instead, it shares methods to actually cut bandwidth usage.

The figure below shows a real bandwidth peak of 120 GB, reduced to 100 GB after applying optimization strategies – a direct saving of 20 GB.

The most straightforward way to reduce bandwidth consumption is throttling – slowing down user access during peak periods.

Based on years of social‑service operations, Tencent has distilled seven key principles for bandwidth optimization:

Tencent’s social product line covers almost all user scenarios (text, images, video, audio, live streaming, files). The following sections focus on bandwidth cost optimization for these social scenarios.

Disable Auto‑Play

During bandwidth peaks, for content such as WeChat public‑account articles, Tencent Video, Moments, QQ Highlights, etc., which contain rich media (GIFs, videos, audio, Flash), the automatic play or download feature is removed. Users must manually trigger playback or download, effectively reducing peak bandwidth while balancing user experience and cost.

Pre‑Push

As the largest domestic social platform, we host massive amounts of PGC video, viral articles, and ad images. These high‑frequency contents can cause bandwidth spikes. By analyzing backend data, we can identify hot content in advance and push it to users’ devices before peak periods, thus lowering the bandwidth peak when users access the content.

For example, if a popular app in MyApp Store has a bug that requires an upgrade, data analysis can predict when users are likely to trigger the upgrade. The patch can then be pre‑delivered to the device, allowing instant local installation and avoiding peak‑time download.

File Compression

In social scenarios, users frequently share images and videos. To meet bandwidth‑optimal requirements without degrading experience, we need to compress these media. Typical approaches include converting JPG to WebP or Sharp, and transcoding video from H.264 to H.265.

On‑Demand Usage

From a product perspective, offering the highest quality (HD images, lossless audio, 1080p video) seems ideal. However, from an operations standpoint, such quality is wasteful when users are on low‑bandwidth networks or low‑resolution devices. Balancing user experience with bandwidth cost is essential.

For example, Tencent Gaming’s live streams provide different resolutions for different devices: highest quality for PC, medium for large‑screen phones, and lowest bitrate for small phones.

Segmented Download

With increasing network speeds and lower fees, video streaming consumes massive bandwidth. Segmented download—fetching data in small time slices—reduces unnecessary bandwidth while keeping buffering low.

Take QQ Music as an example: users often decide within the first 10 seconds whether to continue listening. If a 3 MB song is downloaded at full speed (1 s on a 100 Mbps link) but the user stops after 10 s, about 2 MB of bandwidth is wasted. By downloading only the first two 10‑second segments and then deciding whether to continue, we save bandwidth without harming experience.

Technical Breakthroughs

Beyond product strategies, technical measures such as shrinking app package size, employing P2P, optimizing VoIP codecs, and streamlining transmission protocols can significantly cut bandwidth consumption. Prioritize high‑impact areas following the 80/20 rule.

Examples of such breakthroughs include the adoption of Sharp for image compression and H.265 for video.

Content Moderation (Anti‑Porn)

Enforcing legal compliance also reduces bandwidth waste. Illegal or pornographic content tends to be shared heavily, consuming large amounts of bandwidth. Tencent’s mature content‑moderation capabilities (e.g., Wanshi YouTu) can automatically filter such content, saving bandwidth and complying with regulations.

In summary, the seven bandwidth‑optimization methods described above aim to foster a culture of cost‑effective operations within the DevOps community.

Operations teams are cost centers; before technology creates business value, we must first control operating expenses.

Many of the listed cases require close collaboration between product, development, and operations – a core principle of DevOps.

Click "Read Original" to view the full article on Tencent Cloud Technical Community "TengYunGe".

Operationssocial mediaTencentbandwidth optimizationcost reductionnetwork management
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.