Big Data 10 min read

Inside ByteDance’s Trillion‑Scale Universal Tag Management Platform

ByteDance’s internally built “塔阁平台” (Tag Platform) powers Douyin e‑commerce’s trillion‑scale tag management and audience selection, handling over a thousand tag types, millions of audience combinations, and ten‑million QPS through a hybrid offline‑online architecture that combines Hive, ClickHouse, Bitmap compression, rule‑engine and materialized views, while ensuring high availability, low latency, and robust monitoring.

Ubiquitous Tech
Ubiquitous Tech
Ubiquitous Tech
Inside ByteDance’s Trillion‑Scale Universal Tag Management Platform

ByteDance’s Douyin e‑commerce built a general‑purpose tag management and audience selection system called 塔阁平台 (Tag Platform) to handle “trillion‑level data, thousand‑level tags, and million‑level audiences”.

Core Concepts

Tag : descriptive attribute of a user, e.g., lifecycle stage (new, old, churned).

Audience : set of users satisfying specific conditions, e.g., “mothers who placed more than three orders in the past 30 days”.

Business Scenarios

Search recommendation – weighted ranking, content matching.

Ad targeting – serves Qianchuan, Chuan Shan Jia, Giant Engine.

Marketing activities – precise coupon distribution, audience cold‑start.

Merchant operation – fine‑grained private‑domain operation, influencer circles.

Product pricing – user segmentation for personalized pricing strategies.

Example: the business phrase “find active mothers and push new maternity products” maps to a closed‑loop of selection → distribution → feedback .

Technical Challenges

Data volume: trillions of rows of user‑behavior data.

Tag complexity: thousands of tag types, millions of audience combinations.

Multi‑source data: users, products, merchants, live rooms, short videos.

High concurrency: online QPS reaches ten million.

System Architecture

The platform separates offline and real‑time processing:

Offline selection – Hive + ClickHouse with Bitmap compression and a perfect sharding strategy to accelerate “intersection‑not‑union” queries.

Real‑time rule selection – point‑lookup scenarios.

Real‑time materialized selection – serves recommendation and search‑push scenarios.

Key design diagrams (original article) illustrate the audience selection pipeline, overall system architecture, tag processing flow, and core selection engine.

Performance Indicators

Supports encoding of tens of thousands of user packages per day using Bitmap.

Enables million‑scale audience package queries and previews.

Provides second‑level audience launch for advertising.

Stability and Risk Control

End‑to‑end monitoring and alerting.

Daily stress‑test of tens of thousands of selection tasks.

Multi‑replica disaster recovery with automatic primary‑backup failover.

Audience package version comparison and loss‑control mechanisms.

Data Scale Details

Tags: > 1 000 types.

Audience combinations: tens of thousands.

User‑behavior rows: > 1 trillion.

Real‑time QPS: > 10 million.

Daily tag tasks: > 100 000.

Multi‑entity tags: user, product, content, merchant, live‑room.

Data stored in TB‑scale wide tables; Bitmap compression handles hundred‑billion entries.

Sample Query

SELECT user_id FROM tag_row_table WHERE tag_a > 1 AND user_id IN (SELECT BITMAP('X&Y') FROM tag_bitmap_table)

This SQL demonstrates attribute filtering combined with Bitmap‑based set intersection.

Architecture Diagrams

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Big DataClickHouseHiveBitmapTag ManagementAudience Segmentation
Ubiquitous Tech
Written by

Ubiquitous Tech

A ubiquitous public account for pirate enthusiasts, regularly sharing curated experiences, tech learning, and growth insights. Currently publishing articles on AI RAG customer service, AI MCP technology, and open-source design. Personal free Knowledge Planet: Awakening New World Programmer.

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.