← Back to AI Infrastructure Mind Map
🖥️ AI InfrastructureID: data-pipeline-streaming

Data Pipelines & Streaming

数据管线与流处理
🎯Core Definition
Data pipelines and streaming. Kafka acts as the message bus (ordered per partition, append-only writes + page cache + zero-copy for high throughput; at-least-once / exactly-once consumption semantics), and Flink as a stateful stream engine (event-time windows, watermarks, state backends and checkpoints for exactly-once), emitting second-level real-time features for online inference and feeding a Feature Store aligned with offline features. Batch-stream unification: Lambda (separate batch and stream pipelines — double maintenance and consistency drift) versus Kappa (a single stream pipeline, with batch treated as historical replay of the stream). Data platform layering: ODS (raw ingestion) → DWD (cleaning, normalization, redaction) → DWS (wide tables and aggregated metrics for serving), with lakehouse formats (Iceberg/Hudi/Delta) unifying batch and stream storage. The watermark W=max⁡seen(tevent)−εW = \max_{\text{seen}}(t_{\text{event}}) - \varepsilon governs out-of-order and late data, where ε\varepsilon is the maximum allowed disorder latency.
💡Use Cases
online ML systems (recommendation, risk control, ads) need second-level features; platform layering and warehouse modeling are classic system-design questions; interviews ask about Kafka's throughput mechanics and message semantics, Flink exactly-once, Lambda vs Kappa, and the duties of ODS/DWD/DWS.
⚡Key Problems Solved
versus daily offline batch, end-to-end latency drops from days to seconds (the real-time chain finishes in about one second), letting online models consume the latest user behavior; Kappa unifies batch and stream via replay, removing Lambda's inconsistency and double maintenance; layering unifies metric definitions, clarifies lineage and keeps compliance controllable (redaction at DWD, metric unification at DWS).
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Data Pipelines & Streaming.
Use Cases
In production engineering, what are the primary use cases for Data Pipelines & Streaming and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Why is Kafka high-throughput? Partitions, sequential writes and zero-copy; how are at-least-once and exactly-once achieved?
2
How does Flink achieve exactly-once? Checkpoint barriers and two-phase commit?
3
Lambda vs Kappa: tradeoffs and why Kappa is increasingly preferred?
4
Responsibilities of ODS/DWD/DWS and the data flow? Where do redaction and metric unification happen?
5
How to unify online and offline features for train-serve consistency?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Data Pipelines & Streaming"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardData Loading & IONext Card →GPU Hardware & HBM

🔗 More AI Infrastructure Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/AI_Infra/card/data-pipeline-streaming
中文速览与面试要点

数据管线与流处理 (Data Pipelines & Streaming)

定义: 数据管线与流处理。Kafka 作消息总线(分区内有序、追加写 + 页缓存 + 零拷贝, 吞吐高; 消费语义 at-least-once / exactly-once), Flink 作有状态流引擎(事件时间窗口、水位线、状态后端与 checkpoint 保证精确一次), 产出秒级实时特征供在线推理, 并汇入特征存储 (Feature Store) 与离线特征对齐。批流一体: Lambda 架构(批 + 流两套链路, 双份维护与一致性问题) vs Kappa 架构(只建一条流链路, 批处理视作流的历史回放)。数据平台分层: ODS(原样接入) → DWD(清洗/标准化/脱敏) → DWS(宽表/聚合指标服务), 湖仓一体 (Iceberg/Hudi/Delta) 统一批流存储。水位线 W = _ seen(t_ event) - 控制乱序/迟到数据处理, 其中 为最大允许乱序时延。 使用场景: 推荐/风控/广告等在线 ML 系统需要秒级特征; 数据平台分层与数仓建模是系统设计常考; 面试常问 Kafka 吞吐原理与消息语义、Flink 如何 exactly-once、Lambda vs Kappa 取舍、ODS/DWD/DWS 各层职责。 解决的问题: 对比离线日级批处理: 端到端延迟从天级降到秒级(实时链路端到端约 1s 内), 让在线模型吃到最新用户行为; Kappa 以流回放统一批流, 消除 Lambda 双链路的口径不一致与双倍维护成本; 分层使指标口径统一、血缘清晰、合规可控(DWD 层统一脱敏, DWS 层统一指标)。

核心要点

  • Kafka 为什么吞吐高? 分区、顺序写与零拷贝的机制; at-least-once 与 exactly-once 怎么实现?
  • Flink 如何保证精确一次? checkpoint/barrier 与两阶段提交的原理是什么?
  • Lambda 与 Kappa 架构的取舍? 为什么 Kappa 越来越流行?
  • ODS/DWD/DWS 各层职责与数据流转? 脱敏与指标口径统一在哪一层完成?
  • 实时特征与离线特征如何统一, 保证训练-服务特征一致?