How NetEase Cloud Music Boosted Network Speed by 40% with Cross‑Platform Cronet

This article details NetEase Cloud Music's cross‑platform network library practice, describing the challenges of duplicated implementations, the design of a unified Cronet‑based solution, upgrade strategies, pitfalls, and real‑world performance gains of up to 40% when enabling QUIC.

NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
How NetEase Cloud Music Boosted Network Speed by 40% with Cross‑Platform Cronet

Introduction

During the QCon Global Software Development Conference, NetEase presented the cross‑platform network library practice for NetEase Cloud Music, focusing on reducing duplicated network code across platforms and improving performance with limited resources.

Background

The existing architecture had separate network strategies and monitoring services per platform, leading to repeated work, inconsistency, resource imbalance, and shallow optimizations.

Duplicate effort: each platform re‑implemented the same policies.

Lack of consistency: varying implementations caused uneven quality.

Resource disparity: mobile teams were larger than PC teams.

Deep optimization difficulty: only Android could be deeply tuned.

The goal became a shared network solution across all apps.

Design

The team explored three cross‑platform approaches:

Wrap a C++ core SDK and let Android/iOS integrate it, though integration cost remained high.

Introduce a network proxy layer above existing libraries to consolidate logic, accepting the need for ongoing adaptation.

Replace platform‑specific libraries entirely with a common cross‑platform library (Cronet) and build policies and services on top.

NetEase chose the third option, fully cross‑platformizing the network stack, including the library, policies, and services.

Cronet‑Based Network Library

Cronet was selected for its multi‑platform support, HTTP/2 and QUIC capabilities, and permissive BSD license. A Common API layer isolates the Net component, adding features such as BI, FunctionBridge, and plug‑in services. On top of this, components for network policies, APM monitoring, and HTTPDNS were built, exposed via an interface layer for apps.

Extensions to Cronet included timeout handling, IP reporting, and easier HTTPDNS integration. Components communicate through plug‑in services, keeping them isolated from the network kernel.

Cronet Upgrade Strategy

Upgrading Cronet can cause massive merge conflicts. The team mitigates this by minimizing code changes, using macro switches for C++ modifications, and isolating custom code in separate directories (e.g., a wow folder). Automated tests help catch regressions.

Pitfalls & Tips

Key advice includes adding interfaces instead of deep modifications, using macro switches for isolation, and keeping custom files separate to simplify merges.

Implementation & Results

After integrating Cronet and gradually migrating components, the library was deployed on Android and later iOS. Performance measurements showed a 16‑20% latency reduction without QUIC and a 37‑41% reduction with QUIC enabled, far surpassing typical optimization gains.

Future Plans

The cross‑platform library will expand to Windows, macOS, and other NetEase apps, with ongoing optimizations such as pre‑connect, connection reuse, migration, and support for the upcoming iQUIC standard.

Overall, the practice demonstrates that fully cross‑platformizing a network library using Cronet yields significant performance benefits and easier maintenance.

backend developmentCronetnetwork optimizationC++performance improvementcross-platform networking
NetEase Smart Enterprise Tech+
Written by

NetEase Smart Enterprise Tech+

Get cutting-edge insights from NetEase's CTO, access the most valuable tech knowledge, and learn NetEase's latest best practices. NetEase Smart Enterprise Tech+ helps you grow from a thinker into a tech expert.

0 followers
Reader feedback

How this landed with the community

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.