TikTok系统架构
TikTok整体系统架构

TikTok微服务系统架构

TikTok大数据系统架构

TikTok机器学习系统架构

graph TB %% TikTok Client subgraph Client["🎵 TikTok Client"] direction LR UserLog["User activity log"] VideoCuration["Video curation"] RealTime["Real-time modeling"] end
%% Big Data subgraph BigData["Big Data - 361way.com"] direction TB Kafka["Kafka"] ~~~ Storm["Storm"] Spark["Spark"] ~~~ Flink["Flink"] YARN["YARN"] ~~~ Hive["Hive"]
%% 设置节点样式 style Kafka fill:#90EE90,stroke:#333 style Storm fill:#90EE90,stroke:#333 style Spark fill:#87CEEB,stroke:#333 style Flink fill:#87CEEB,stroke:#333 style YARN fill:#FFD700,stroke:#333 style Hive fill:#FFD700,stroke:#333 end
%% Microservice subgraph Micro["Microservice"] direction TB K8s["Kubernetes"] ~~~ Mesh["Service mesh"] ~~~ GRPC["Go/gRPC"] Recall["Recall service"] ~~~ Indexing["Indexing"] ~~~ Profiling["Profiling service"] Prediction["Prediction service"] ~~~ Redis["Redis"] ~~~ ES["ElasticSearch"]
%% 设置节点样式 style K8s fill:#87CEEB,stroke:#333 style Mesh fill:#87CEEB,stroke:#333 style GRPC fill:#87CEEB,stroke:#333 style Recall fill:#FFD700,stroke:#333 style Prediction fill:#FFD700,stroke:#333 style Indexing fill:#FFD700,stroke:#333 style Profiling fill:#FFD700,stroke:#333 style Redis fill:#40E0D0,stroke:#333 style ES fill:#40E0D0,stroke:#333 end
%% Machine Learning subgraph ML["Machine Learning"] direction TB TF["Tensorflow"] ~~~ CV["Computer<br/>vision"] ~~~ NLP["NLP"] CBF["Content based<br/>filtering"] ~~~ CF["Collaborative<br/>filtering"] ~~~ MF["Matrix<br/>factorization"] CNN["CNN"] ~~~ RNN["RNN"] ~~~ GBDT["GBDT"]
%% 设置节点样式 style TF fill:#87CEEB,stroke:#333 style CV fill:#87CEEB,stroke:#333 style NLP fill:#87CEEB,stroke:#333 style CBF fill:#FFD700,stroke:#333 style CF fill:#FFD700,stroke:#333 style MF fill:#FFD700,stroke:#333 style CNN fill:#DDA0DD,stroke:#333 style RNN fill:#DDA0DD,stroke:#333 style GBDT fill:#DDA0DD,stroke:#333 end
%% Data Storage subgraph Storage["Data Storage"] direction LR HBase["HBase"] HDFS["HDFS"] MySQL["MySQL"] MongoDB["MongoDB"] S3["S3"]
%% 设置节点样式 style HBase fill:#FFD700,stroke:#333 style HDFS fill:#FFD700,stroke:#333 style MySQL fill:#40E0D0,stroke:#333 style MongoDB fill:#40E0D0,stroke:#333 end
%% 连接关系 Client <--> Micro BigData <--> Micro Micro <--> ML Micro <--> Storage
%% 整体样式 classDef default fill:#fff,stroke:#333,stroke-width:1px-
颜色方案:
- 蓝色系:用于基础服务组件
- 黄色系:用于功能服务
- 绿色系:用于大数据组件
- 青色系:用于存储组件
- 紫色系:用于机器学习算法
-
分组结构:
- TikTok Client
- Big Data
- Microservice
- Machine Learning
- Data Storage