Backend Development 17 min read

Design and Implementation of Baidu's Product Promotion System

This article details the architecture, core services, user interfaces, and technical challenges of Baidu's product promotion system, explaining the roles of traffic owners and advertisers, the CPS billing model, dynamic library reporting, and database batch‑write optimizations for high‑throughput e‑commerce scenarios.

Architect
Architect
Architect
Design and Implementation of Baidu's Product Promotion System

1. Overview of the Promotion Process

The product promotion system is a common component in e‑commerce platforms, connecting content creators (traffic owners) and merchants (advertisers) to drive sales through "live‑selling" or "bring‑goods" strategies, with the goal of maximizing transaction conversion.

(1) Traffic Owner

Traffic owners are influential creators or streamers who embed product links in their content; when users click and purchase, the traffic owner receives a commission.

(2) Advertiser

Advertisers are merchants who set commission ratios for each product and rely on traffic owners to promote their items, effectively turning the promotion into a wide‑reach advertisement.

(3) CPS (Cost Per Sale)

CPS is a billing model that charges based on actual sales, making it suitable for shopping‑type apps and requiring precise traffic data for accurate commission calculation.

2. Business Characteristics of Baidu's Promotion Process

The system serves three user groups—traffic owners, advertisers, and end‑users—through three distinct UI components and five core backend services.

(1) Three User Interfaces

The advertiser UI (B‑side mini‑program) allows merchants to register products and enable commission‑based promotion. The traffic‑owner UI provides a product selection interface for creators to embed product windows. The user UI presents the purchase flow within Baidu's app ecosystem.

(2) Five Core Services

The system is split into registration, mounting, promotion, transaction, settlement, and asset services. Mounting and promotion services are newly designed for the promotion scenario, while the other three reuse existing transaction‑center capabilities.

(3) Baidu‑Specific Promotion Flow

Key technical challenges include providing a unified solution across Baidu’s multiple apps, accurately capturing promotion behavior, and integrating with existing order and settlement systems while ensuring secure, high‑performance data handling.

3. Implementation of Promotion Services

(1) Promotion Record Reporting via Dynamic Library

Baidu’s mini‑program dynamic library is a side‑loaded component that reports promotion data without hard‑coding logic into the order page, ensuring decoupling, maintainability, and cross‑app compatibility.

(2) Database Batch‑Write Optimization

Promotion data, which has high write volume but low real‑time query demand, is written to the database using an asynchronous batch‑write model that aggregates records in a blocking queue, dramatically reducing TPS and improving throughput.

The system also employs horizontal sharding and further aggregation of records per instance to maximize write efficiency.

4. Summary

Building a product promotion system involves complex business logic and cross‑team collaboration, but with Baidu’s transaction‑center foundation, most technical components—except the dynamic library—are straightforward to implement, focusing mainly on boundary control and detail completeness.

Regardless of the engineering role, mastering both breadth and depth is essential for delivering robust, scalable solutions.

backend architecturemicroservicesDatabase OptimizationCPSBaidudynamic libraryProduct Promotion
Architect
Written by

Architect

Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.

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.