How 360’s SSP Engine Delivers Billions of Ads with Microservices and High‑Performance Architecture
This article explains the architecture and key technologies of 360’s SSP advertising engine—including flexible micro‑service layers, DAG‑based topology, rule and template management, and high‑performance Go‑based HTTP frameworks—that enable billion‑scale ad delivery with low latency and high concurrency.
1. Overview
Internet business models include ads, games, and value‑added services. SSP (Sell‑Side Platform) is a media service platform that uses audience targeting to manage ad inventory, optimize delivery, and increase media revenue. In simple terms, apps request ads from an SSP, which selects suitable ads and defines their presentation style, continuously optimizing selection and layout to maximize earnings.
2. SSP System Architecture
The SSP is a large‑scale business system divided into six layers: product, interface, business‑middle, microservice, data‑processing, and data‑storage.
3. Flexible and Scaling
3.1 Micro Service
Micro services replace monolithic architecture, allowing independent sub‑services to be developed, deployed and scaled independently, reducing coupling and improving extensibility.
3.2 Topology Organizer (based on DAG)
The framework defines four concepts: DAG, topology, stage, and context. A business flow is broken into stages; a DAG represents execution order, topology controls stage sequencing, and context passes data between stages, enabling parallelism and code reuse.
3.3 Rule Manage System
Rules map conditions to outputs, allowing fine‑grained control such as frequency caps without code changes. A rule table stores many rules; a rule engine provides insert, delete, and query operations. Quick‑match rules improve lookup performance under high request volume.
<business name="卫士广告">
<stage name="用户画像">
<attrlist>{年龄:20;收入:3k;爱好:旅游}</attrlist>
</stage>
<stage name="点睛DSP">
<adlist>{ad1:com.mobilesafe.apk ;ad2:com.zhushou.apk; ad3:com.browser.apk}</adlist>
</stage>
...
</business>3.4 Template Manage System
Base templates define a limited set of static ad layout types. Polymorphism instantiates templates with dynamic assets (material, title, link). Combination merges multiple instantiated templates to build flexible page layouts, all configurable via the rule engine.
4. High‑Performance, High‑Concurrency Engine Architecture
4.1 Multi‑process framework (cloudUcs)
cloudUcs uses a master‑slave multi‑process model with multi‑threaded workers, providing reliability and load balancing, but suffers from high memory usage, reload latency, uneven worker load, and a steep learning curve.
4.2 Multi‑threaded framework (trident)
trident runs in a single process with hot‑config reload, supporting TCP/UDP/HTTP services. It offers lower memory footprint and better load balancing, yet faces mutex‑induced performance hits, complex thread synchronization, and debugging difficulty.
4.3 Go microservice framework (migo)
migo is a Go‑based HTTP engine that leverages goroutines for fine‑grained parallelism. Benchmarks show migo is 3‑5× faster than php‑fpm on simple tasks and up to 20× on complex workloads. Its advantages include superior performance, easy onboarding, and strong extensibility.
Future plans for migo involve exploring further performance optimizations, integrating with Docker, scheduling diverse topologies, and expanding common stage modules.
360 Zhihui Cloud Developer
360 Zhihui Cloud is an enterprise open service platform that aims to "aggregate data value and empower an intelligent future," leveraging 360's extensive product and technology resources to deliver platform services to customers.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.