Backend Development 16 min read

Baidu Wenku Download Service Microservices Transformation Practice

Baidu Wenku revamped its download function by breaking the monolith into an independent microservice, establishing unified protocols, a modular framework for security, rate‑limiting and logging, and real‑time monitoring, which reduced maintenance costs, improved user experience, and enabled rapid, system‑wide updates.

Baidu Geek Talk
Baidu Geek Talk
Baidu Geek Talk
Baidu Wenku Download Service Microservices Transformation Practice

This article details how Baidu Wenku transformed its download service from a monolithic architecture to an independent microservices system. The document sharing platform, launched in 2009, faced numerous challenges in both business and technical aspects after years of development.

Problems Identified:

1. Poor user experience with frequent complaints about download failures, missing documents, or incomplete content

2. High maintenance costs due to multiple download methods across PC, WAP, mini-programs, and APP platforms, plus various third-party cooperation services

3. Complex anti-fraud and anti-cheating requirements with inconsistent strategies across different interfaces

Root causes included tight coupling with the main architecture, scattered code without unified standards, lack of monitoring and operational tools, and inaccurate error messaging.

Solution Approach:

The team adopted microservices architecture with two key initiatives: 1) Defining microservice communication protocols and rules while deploying the download system independently for vertical service separation; 2) Developing a customized download technical framework based on business requirements.

Implementation Details:

The framework includes five main components: 1) Abstracting download processes into standardized steps (initialization, security checks, permission verification, main business logic, post-processing); 2) Describing download behaviors with detailed data collection including user info, scenario data, and content objects; 3) Providing componentized functional modules for fraud detection, rate limiting, and permission validation; 4) Standardizing exception handling mechanisms with unified error codes and automatic log collection; 5) Building operational analysis tools and real-time monitoring systems.

The infrastructure uses Baidu's BNS (Baidu Naming Service) for service discovery and load balancing, RAL client for remote communication, and Baidu Cloud Platform for deployment. The new architecture achieves complete isolation from the main Wenku business, enabling independent development and deployment.

Results:

After transformation, the download service achieved "one change affects all" capability, allowing unified updates across all download entry points. Customer service can now independently query download records and logs, and real-time monitoring enables rapid response to download success/failure rate fluctuations.

distributed systemscloud-nativebackend architectureMicroservicessystem designBaidu Wenkuservice decomposition
Baidu Geek Talk
Written by

Baidu Geek Talk

Follow us to discover more Baidu tech insights.

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.