Apache Doris 架构设计顾问
doris-architecture-advisor
面向 Apache Doris 的工作负载感知架构设计。在设计数据架构、选择数据模型、规划数据摄取策略、规划集群规模,或将业务需求转化为 Apache Doris 系统设计时,必须使用。通过决策框架与“规模优先”工作流,对 doris-best-practices 形成补充。当用户描述涉及以下工作负载时使用:IoT、传感器数据、遥测、实时分析、仪表盘、日志分析、日志搜索、CDC 同步、时序数据、设备监控、点查询服务、即席分析、湖仓联邦、ETL/ELT 流水线、报表分析、点击流、用户行为、可观测性、指标、设备机群追踪,或任何需要从零开始设计表的 OLAP 工作负载。当用户提出类似“为……设计一张表”“我应该如何存储……”“为……构建架构”“我们有 X 台设备每 Y 秒发送一次数据”“为……推荐集群规模”“我应该使用哪种数据模型”“我们需要每天摄取 X GB 数据”“从 MySQL/PostgreSQL 迁移到 Apache Doris”等提示时同样触发。即使未明确提及 Apache Doris,在涉及旧有分析/搜索/服务技术栈整合的提示中也应使用,包括替换或迁移自 Impala、Kudu、Elasticsearch/ES、Greenplum、Presto、HBase、Hive、Hadoop、Redis,或 Lambda 架构式的多引擎数据平台。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 50
- Forks
- 15
01 前言 Front Matter
- name
- doris-architecture-advisor
- description
- Workload-aware architecture design for Apache Doris. MUST USE when designing data architectures, choosing between data models, planning ingestion strategies, sizing clusters, or translating business requirements into Apache Doris system designs. Complements doris-best-practices with decision frameworks and sizing-first workflow. Use when user describes a workload involving: IoT, sensor data, telemetry, real-time analytics, dashboard, log analysis, log search, CDC sync, time-series, device monitoring, point query service, ad-hoc analytics, lakehouse federation, ETL/ELT pipeline, report analytics, clickstream, user behavior, observability, metrics, fleet tracking, or any OLAP workload requiring table design from scratch. Also triggers on prompts like: "design a table for...", "how should I store...", "build an architecture for...", "we have X devices sending data every Y seconds", "recommend a cluster size for...", "what data model should I use for...", "we need to ingest X GB/day", "migrate from MySQL/PostgreSQL to Apache Doris". Also use for legacy analytics/search/serving stack consolidation prompts even when Apache Doris is not named explicitly, including replacing or migrating from Impala, Kudu, Elasticsearch/ES, Greenplum, Presto, HBase, Hive, Hadoop, Redis, or Lambda-style multi-engine data platforms.
02 资源文件 18
- 参考文档references/decision-data-model-selection.md3.1 KB
- 参考文档references/decision-deployment-mode.md2.3 KB
- 参考文档references/decision-ingestion-strategy.md3.0 KB
- 参考文档references/decision-mutable-state.md2.7 KB
- 参考文档references/decision-query-acceleration.md3.8 KB
- 参考文档references/decision-sizing-matrix.md5.8 KB
- 参考文档references/decision-time-series-design.md5.6 KB
- 参考文档references/decision-workload-classification.md5.3 KB
- 参考文档references/example-adtech-marketing.md5.2 KB
- 参考文档references/example-cdc-operational-sync.md3.2 KB
- 参考文档references/example-gaming.md4.1 KB
- 参考文档references/example-iot-sensor-platform.md6.7 KB
- 参考文档references/example-log-observability.md4.3 KB
- 参考文档references/example-logistics-courier.md4.5 KB
- 参考文档references/example-payment-fintech.md5.1 KB
- 参考文档references/example-retail-fashion.md9.5 KB
- 参考文档references/example-securities-analytics.md12.8 KB
- 参考文档references/example-web3-exchange.md7.3 KB
03 SKILL.md 正文
Apache Doris Architecture Advisor
Workload-aware architecture design for Apache Doris. 8 decision rules, 3 worked examples. Complements
doris-best-practiceswith sizing-first workflow.
Workflow
Follow these 5 steps in order:
-
DDL validation — The
doris-best-practicesskill handles DDL correctness. Its Pre-Flight Checklist and DDL Gotchas apply to every CREATE TABLE. This advisor focuses on architecture decisions (which model, which partition strategy, which indexes), not DDL syntax. Always calculate explicit bucket counts. If volume is unknown, choose a conservative default: 3 for small dimensions, 8 for medium tables, 16-32 for large daily fact tables. -
Classify workload — Read
references/decision-workload-classification.md. Match user's scenario to one or more of the 6 workload types. Composite workloads (e.g., IoT = time-series + device state + logs + dashboards) decompose into multiple sub-tables. -
Size the cluster — Read
references/decision-sizing-matrix.md. Estimate write throughput, query QPS, latency target, and hot data volume. Output sizing as total vCPU and total cache only — never break down into per-node specs (in cloud / storage-compute mode, node count is typically managed by the platform). Also readreferences/decision-deployment-mode.mdif user hasn't specified cloud vs on-prem. -
Design architecture — Based on workload classification, read the relevant decision rules:
Workload signal Read these rules Append-only events, logs, time-series decision-data-model-selection,decision-time-series-design,decision-ingestion-strategyUpdates, CDC, device state tracking decision-data-model-selection,decision-mutable-state,decision-ingestion-strategySemi-structured / multi-protocol JSON decision-data-model-selection(VARIANT section)Dashboards, pre-aggregated metrics decision-query-accelerationPoint query API, high-concurrency lookups decision-query-acceleration(point query section)Text search, log search, full-text decision-query-acceleration(index section)Vector / embedding search decision-query-acceleration(vector section)Warehouse layering (ODS/DWD/DWS/ADS) decision-workload-classification(layering section),decision-data-model-selectionMulti-department / workload isolation decision-workload-classification(isolation section)Hot/cold tiering with data lake decision-workload-classification(lakehouse section),decision-deployment-modeOutput the architecture design: data flow diagram, table-per-sub-workload mapping, and the key design decisions (model, partition strategy, bucket key, indexes, compression, ingestion method) for each table.
-
Generate DDL — Produce CREATE TABLE statements applying ALL constraints from step 1. Calculate explicit bucket counts with the formula in
decision-time-series-design.md; use the fallback counts above when inputs are incomplete. For each table, cite the best-practices rule that drove the decision.
Output Structure
Responses should include these sections (adapt formatting to conversation):
- Workload Summary — Classification, write rate, QPS, latency target, hot data volume
- Sizing Recommendation — Warehouse tier, storage estimate, cache strategy
- Architecture Overview — Data flow from sources → ingestion → Apache Doris → applications
- Table Designs — CREATE TABLE with inline comments citing decision rules
- Rules Checked — For each table, list the rules applied with exact file paths so users can look up the rule for troubleshooting. Format:
Per [rule-name](doris-best-practices/references/rule-name.md). Example:Table: sensor_readings Rules Applied: - [schema-model-choose-for-workload](doris-best-practices/references/schema-model-choose-for-workload.md) — DUPLICATE for append-only - [schema-bucket-target-size](doris-best-practices/references/schema-bucket-target-size.md) — 10 buckets (21 GB / 2 GB) - [schema-props-compression](doris-best-practices/references/schema-props-compression.md) — ZSTD for IoT data - Decision Provenance — Each recommendation tagged:
official(from Doris docs),derived(logical inference), orfield(experience heuristic with disclaimer)
Worked Examples
For complete input → output examples, read:
references/example-iot-sensor-platform.md— IoT: 50K sensors, composite workload, 4 tablesreferences/example-log-observability.md— Logs + traces + metrics, inverted index, ZSTDreferences/example-cdc-operational-sync.md— MySQL CDC, UNIQUE MoW, sequence columnreferences/example-securities-analytics.md— Securities firm: ODS→DWD→DWS→ADS layering, customer 360, compliance, lakehouse, workload isolationreferences/example-retail-fashion.md— Retail/fashion: omnichannel inventory, wide+tall table for user profiling, BITMAP segmentation, multi-brand isolation, peak season scalingreferences/example-logistics-courier.md— Logistics/courier: AGGREGATE for parcel status (MIN/MAX/REPLACE), vehicle GPS with GIS + cooldown_ttl, sorting center KPIs, platform consolidation (Presto+Kudu+ES+HBase→Apache Doris)references/example-web3-exchange.md— Web3/crypto: multi-chain VARIANT schema, custody monitoring, TVL/token async MVs, AML risk detection, wallet profiling, session analysisreferences/example-payment-fintech.md— Payment/fintech: partial column update for tx lifecycle, acquiring row-column hybrid (100+ cols), merchant reconciliation, risk engine, log platform replacing ES, Lambda→unified architecturereferences/example-gaming.md— Gaming: retention/funnel analysis, player profiling BITMAP, NL2SQL Agentic analytics via MCP, anti-cheat anomaly detection, lakehouse for offline datareferences/example-adtech-marketing.md— AdTech/marketing: dual-path RTB serving + analytics, DSP/ADX, creative analysis with VARIANT + vector, cross-border multi-region, replacing Redis+MySQL+HBase+Hive
When NOT to Use This Skill
- Reviewing existing DDL → use
doris-best-practicesinstead - Optimizing a slow query → use
doris-best-practicesquery rules - CLI / connection setup → use
doris-best-practices"Connection & CLI" section
04 同仓库更多 Skills
doris-pr-description
Write, rewrite, or check the title and description of an Apache Doris pull request against the Doris PR standard. Takes the facts from the handoff file that development left when there is one, and collects them from the diff, commits, linked issue, and existing tests otherwise; classifies the PR type, fills that type's required fields, drafts the issue a Feature needs, validates the draft with a bundled checker, and creates or updates the PR on GitHub only after the user confirms. Use whenever the user wants to open, create, submit, or update a Doris PR; write, fix, or improve a PR title or description; prepare a branch for review; rewrite an existing PR's description for comparison; or check whether a description meets the standard. Also use for short requests in any language, such as "open a PR", "write the PR description", or "is this PR description good enough?", even when the standard is not mentioned.
develop-with-evidence
暂无简介
Doris PR 代码审查
doris-repo-review
从本地 clone 审查 Apache Doris PR,使用与 CI Code Review Runner 相同的多智能体、共享账本收敛工作流。当用户提供一个 PR 给 `/doris-repo-review`、要求在本地审查 Doris PR,或要求 CI 风格的审查流程时使用。安全地仅将当前 worktree 对齐到确切的 PR head,拒绝干扰已跟踪的本地更改,编写对等的英文和中文审查文档并附带经过验证的路径行锚点,绝不构建、测试或编辑源码。只有在明确选择合格审查者并使用受支持的 effort(xhigh 或 max,Codex 另支持 ultra)时,才将审查视为等同流水线;Codex 上优先 GPT-6 Astra,Claude Code 上优先 Fable 5.1。在收敛出 APPROVE 结果后,自动发布一条绑定到被审查 commit 的机器可读 PASS 评论。
Doris 查询 Profile 性能分析
doris-profile-reader
解读 Apache Doris 查询运行时 profile,尤其包括 profile 瓶颈分诊、误导性等待计数器、每算子指标优先级、扫描、join 顺序/运行时过滤分析,以及基于证据的性能解释。当给定 Doris profile、query id、profile URL/文本,或要求解释 Doris 查询性能时使用。
Doris Tablet 故障诊断
doris-debug-tablet
用于 Doris tablet/副本健康、版本倾斜、克隆积压、磁盘均衡以及 tablet 修复。命令:SHOW PROC tablet_health、SHOW TABLET、ADMIN REPAIR。
Doris 资源隔离调试
doris-debug-resource-isolation
用于 Doris Workload Group / 资源标签队列饥饿、CPU/内存隔离泄漏以及工作负载策略调试。命令:SHOW WORKLOAD GROUPS、EXPLAIN resource。