# Apache Storm

**Apache Storm** 是一个免费、开源的分布式实时计算系统，用于处理无界数据流；Hadoop 之于批处理，正如 Storm 之于实时处理。它运行在集群之上，具备容错能力，保证数据会被处理，并且可以与任何编程语言配合使用。<sup>[1](https://storm.apache.org/)</sup> 它的应用场景包括实时分析、在线机器学习、持续计算、分布式 RPC 和 ETL。<sup>[1](https://storm.apache.org/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 免费、开源的分布式实时计算系统，采用 Apache License 2.0 许可<sup>[1](https://storm.apache.org/)</sup><sup> • </sup><sup>[2](https://storm.apache.org/about/free-and-open-source.html)</sup> |
| 核心抽象 | 喷口（Spout，数据流来源）、螺栓（Bolt，处理单元）与拓扑（Topology，由喷口和螺栓组成、无限期运行的图）<sup>[3](https://storm.apache.org/about/simple-api.html)</sup> |
| 集群架构 | Nimbus 主守护进程负责分发代码并分配任务；工作节点上的 Supervisor 守护进程负责启停工作进程；所有协调都经由 Zookeeper 完成<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup> |
| 处理保证 | 基础抽象提供至少一次语义；通过更高层抽象 Trident 可实现恰好一次语义<sup>[5](https://storm.apache.org/about/guarantees-data-processing.html)</sup> |
| 吞吐量 | 一项基准测试测得 Storm 单节点每秒处理超过一百万条元组<sup>[1](https://storm.apache.org/)</sup> |
| 当前版本 | 3.1.0，2026 年 9 月 12 日发布；要求 Java 25；2.x 系列以 2.8.9 收尾，已停止维护<sup>[6](https://storm.incubator.apache.org/2026/09/12/storm310-released.html)</sup> |
| 项目状态 | 自 2014 年 9 月 17 日起成为 Apache 顶级项目；处于维护模式，有 48 名提交者和 47 名 PMC 成员<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup> |

## 历史

Storm 诞生于分析公司 BackType。2011 年 5 月，BackType 与 Twitter 进入收购谈判，Storm 随后在 Twitter 运行，沿用它在创始人决定将其开源之前在那里的名称。创建者内森·马兹（Nathan Marz）后来离开 Twitter，几个月后决定要让 Storm 转向共识驱动的开发模式。2013 年 9 月，在 Yahoo 的安迪·冯（Andy Feng）协助下，他正式提议让 Storm 进入 Apache 孵化器。<sup>[8](https://nathanmarz.com/blog/history-of-apache-storm-and-lessons-learned.html)</sup> Apache 软件基金会于 2014 年 9 月 17 日通过董事会决议设立 Apache Storm 项目。<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup>

一份流处理系统对比表将 Storm 的创建者记为 BackType，年份为 2011 年，处理模型为实时，编程模型为 DAG，实现语言为 Java 和 Clojure。<sup>[9](https://dspace.ut.ee/server/api/core/bitstreams/930d2424-bea6-4d0c-b678-b932dff448e9/content)</sup> Twitter 后来沿着 Storm 的血脉构建了后继系统 Heron，采用 DAG 编程模型和 Zookeeper 协调。<sup>[9](https://dspace.ut.ee/server/api/core/bitstreams/930d2424-bea6-4d0c-b678-b932dff448e9/content)</sup>

## 编程模型

Storm 程序操作并转换元组流；元组是一组具名值的有序列表，其中的值可以是任意类型的对象，Storm 不认识的类型可以通过注册序列化器来处理。这套 API 恰好只有三种抽象。<sup>[3](https://storm.apache.org/about/simple-api.html)</sup>

- **喷口**是计算中的数据流来源。它通常从一个队列代理（如 Kestrel、RabbitMQ 或 Kafka）读取数据，但也可以自行生成数据流，或从 Twitter 流式 API 之类的源读取；大多数队列系统都已有现成实现。<sup>[3](https://storm.apache.org/about/simple-api.html)</sup>
- **螺栓**处理任意数量的输入流，并产生任意数量的新输出流。计算的绝大部分逻辑都放在螺栓里：函数、过滤、流式连接、流式聚合，以及与数据库交互。<sup>[3](https://storm.apache.org/about/simple-api.html)</sup>
- **拓扑**是由喷口和螺栓构成的网络，每条边表示某个螺栓订阅了另一个喷口或螺栓的输出流。它是一个任意复杂的多级流式计算，部署后会无限期运行。<sup>[3](https://storm.apache.org/about/simple-api.html)</sup>

拓扑中的每个节点都并行执行；你为每个节点指定所需的并行度，Storm 便会在集群中生成相应数量的线程。拓扑会一直运行到被杀死为止，由“storm”命令行客户端将它们提交到集群；所谓“本地模式”则在进程内模拟一个 Storm 集群，用于开发和测试。<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup><sup> • </sup><sup>[3](https://storm.apache.org/about/simple-api.html)</sup> 拓扑定义是 Thrift 结构体，而 Nimbus 是一个 Thrift 服务，因此可以用任何编程语言创建并提交拓扑。<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup> 项目的教程指出，Java 是主要语言，但教程使用 Python 示例来展示 Storm 的多语言能力。<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup>

## 集群架构

主节点运行一个名为 **Nimbus** 的守护进程，类似 Hadoop 的 JobTracker。Nimbus 在集群中分发代码、把任务分配给各台机器，并监控故障。每个工作节点运行一个 **Supervisor** 守护进程，它监听分配给本机的工作，并据此启停工作进程；每个工作进程执行某个拓扑的一个子集。<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup>

Nimbus 与各 [Supervisor](https://www.edgepedia.org/zh/supervisor) 之间的所有协调都通过一个 Zookeeper 集群完成。Nimbus 和 Supervisor 守护进程都是[快速失败](https://www.edgepedia.org/zh/fail-fast)且无状态的：所有状态要么保存在 Zookeeper 中，要么保存在本地磁盘上，因此可以用 kill -9 杀掉它们，重启后一切仿佛什么都没发生过。正是这一设计让 Storm 集群保持稳定。<sup>[4](https://github.com/apache/storm/blob/master/docs/Tutorial.md)</sup> 架构对比也确认了 Storm 使用 Zookeeper 进行协调，并支持独立运行、YARN 和 Mesos 三种资源管理方式。<sup>[9](https://dspace.ut.ee/server/api/core/bitstreams/930d2424-bea6-4d0c-b678-b932dff448e9/content)</sup>

## 消息处理的保证

Storm 保证每条元组都会被完整处理。从喷口发出的一条元组可以衍生出成千上万条元组，当元组树被耗尽、树中每条消息都处理完毕时，Storm 便认为它已被完整处理。如果某条元组的树在配置的超时时间内没有被完整处理，它就视为失败；该超时默认为 30 秒，由 Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS 设置控制。<sup>[10](https://storm.apache.org/releases/current/Guaranteeing-message-processing.html)</sup>

基础抽象提供**至少一次**的处理保证，与队列系统提供的保证相同，只有在发生失败时才会重放消息。使用 **Trident**——Storm 基础抽象之上的一层更高层抽象——则可以获得恰好一次的处理语义。<sup>[5](https://storm.apache.org/about/guarantees-data-processing.html)</sup> 项目文档还列出了尽力而为、至少一次，以及通过 Trident 实现的恰好一次，作为可用的处理保证级别。<sup>[10](https://storm.apache.org/releases/current/Guaranteeing-message-processing.html)</sup>

**可靠性是如何实现的。** 一组特殊的“acker”任务为每条喷口元组追踪其元组的 DAG。拓扑中创建的每条元组都会获得一个随机的 64 位 id，当一条元组被 ack 时，它会告诉相应的 acker 元组树发生了怎样的变化。ack 值是树中所有创建和被 ack 的元组 id 的异或；当它变为零时，树就完整了。由于这些 id 是随机的 64 位数字，偶然出现零的概率极小：即使每秒进行 10,000 次 ack，也要 5,000 万年才会出错一次，而且即便如此，也只有当该元组在拓扑中同样失败时才会导致数据丢失。因任务死亡而未被 ack 的元组，或 acker 死亡的元组，会超时并被重放；如果喷口任务死亡，Kestrel 或 RabbitMQ 之类的队列源会重放待处理的消息。<sup>[11](https://github-wiki-see.page/m/xumingming/storm/wiki/Guaranteeing-message-processing)</sup>

可靠性可以拿来换性能。将 Config.TOPOLOGY_ACKERS 设为 0 即可完全关闭元组树追踪；在 SpoutOutputCollector.emit 中省略消息 id 可对单条消息关闭追踪；发送非锚定元组则把下游的一个子集排除在保证之外。不追踪元组树可使传输的消息数量减半，因为通常树中每条元组都会产生一条 ack 消息。<sup>[11](https://github-wiki-see.page/m/xumingming/storm/wiki/Guaranteeing-message-processing)</sup> 在真实集群上的测量表明，带 ack 的 Storm 能保证可靠投递，但要以吞吐量为代价；而在一项学术测量中，不带 ack 的 Storm 能够维持约每秒 100,000 条元组。<sup>[12](https://digicoll.lib.berkeley.edu/nanna/record/137958/files/EECS-2015-144.pdf?registerDownload=1&version=1&withMetadata=0&withWatermark=0)</sup>

## 发布与安全

2026 年 7 月 22 日发布的 Storm 3.0.0 是最新的主要版本系列。它彻底移除了对 Clojure 的依赖，为工作进程间通信和集群状态增加了 Zstd 压缩，引入了基于 AIMD 的动态批大小和一种新的、考虑抖动（jitter）的流分组方式，还包含调度器改进和更精简的二进制发行包。运行 Storm 3.0.0 需要 Java 25，Java API 仍然与 Storm 2.x 完全向后兼容，唯一的例外是已被移除的 Clojure DSL。Apache Storm 2.8.9 同时发布，作为 2.x 系列的最后一个版本。<sup>[13](https://storm.apache.org/2026/07/22/storm300-released.html)</sup>

Storm 3.1.0 于 2026 年 9 月 12 日跟进发布，主要是一个安全与加固版本，解决了一组协同披露的安全问题，同时包含缺陷修复、依赖升级、文档改进和一个新的 [Apache Iceberg](https://www.edgepedia.org/zh/apache-iceberg) 输出端。官方鼓励所有 3.0.0 用户升级。由于 2.x 系列已停止维护、不再接收安全修复，仍停留在 2.x 的用户被告知应把这些漏洞视为在该系列中未修补，并迁移到 3.x——它们已在 3.1.0 中修复。若干修复改变了默认行为，涉及调度器策略白名单、JSONP 包装、状态序列化器以及 nimbus.groups 的求值。<sup>[6](https://storm.incubator.apache.org/2026/09/12/storm310-released.html)</sup>

近期的 2.x 版本体现了该系列的维护性质。Storm 2.8.6 修复了 CVE-2026-35337，这是一个不可信数据反序列化漏洞：Storm 通过 Nimbus Thrift API 收到经 base64 编码的 TGT 数据块后，使用 ObjectInputStream.readObject() 反序列化，且未做类过滤；具有拓扑提交权限的已认证用户可提供精心构造的序列化对象，从而在 Nimbus 和 Worker 的 JVM 中实现远程代码执行。Storm 2.8.7 修复了 CVE-2026-40557，这是 Prometheus Reporter 中一处影响整个 JVM 的 TLS 安全降级问题，波及 2.6.3 至 2.8.6 版本，原因是启用 skip_tls_validation 配置时证书校验不当。<sup>[14](https://github.com/apache/storm/releases)</sup> 董事会会议记录显示，2026 年某一季度在发布方面异常活跃：PMC 处理了大量 AI 辅助提交的 CVE 报告，逐一甄别并加以处理，从中甄别出 5 个真正的 CVE，并在短期内通过多个版本加以修复。<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup>

## 对比基准中的性能表现

独立基准测试将 Storm 归入低延迟流处理系统之列，具体结果因工作负载和研究设计而异。

2022 年的一项实时流处理框架实证评估发现，在大多数测试中 Flink 优于 Storm 和 Spark Streaming，吞吐量最高可达后二者的 5 倍，延迟只有一半，故障恢复时间为亚秒级；而 Storm 在各次实验中的表现最为不稳定。<sup>[15](https://research.tensorgate.org/index.php/IJBIBDA/article/view/77)</sup> 一项更早的研究测量了节点故障下的行为，报告 Storm 的消息丢失率为 22.2%，Flink 为 12.8%，Spark Streaming 为 0%；并指出由于微批设计，Spark Streaming 的处理速率远低于 Storm 和 Flink。<sup>[16](https://www.gta.ufrj.br/ftp/gta/TechReports/ALD16b.pdf)</sup> 一份无服务器系统综述在其比较的平台中，将 Storm 描述为被认为性能最高且延迟较低的流处理引擎。<sup>[17](https://faculty.cs.gwu.edu/timwood/papers/19-lanman-serverless.pdf)</sup>

基准测试工作也塑造了此类比较的开展方式。柏林工业大学的卡里莫夫（Karimov）、拉布尔（Rabl）及其同事提出的 ICDE 2018 基准测试框架，在窗口操作上评估了 Apache Storm、Apache Spark 和 [Apache Flink](https://www.edgepedia.org/zh/apache-flink)，为有状态算子定义了延迟与吞吐量，并将被测系统与驱动器分离。<sup>[18](https://arxiv.org/abs/1802.08496)</sup> 研究也直接针对 Storm 的弱点：默认的轮询（Round Robin）调度器的局限一直是被反复研究的课题，而诸如 R-Storm 之类的资源感知调度工作，正是建立在 Storm 作为业界最流行的流处理系统之一的地位之上。<sup>[19](https://arxiv.org/abs/1904.05456)</sup> 一项部署在 Apache Storm 上的流量均衡技术在其评估中，相比此前的最先进水平，分别将吞吐量提升了 150%、延迟降低了 60%。<sup>[20](https://arxiv.org/abs/1510.05714)</sup>

## 项目状态与社区

Apache Storm 作为仍在运行、已被重新激活的顶级项目向 ASF 董事会汇报，有 48 名提交者和 47 名 PMC 成员，提交者与 PMC 成员比例约为 1:1。PMC 多次报告，近年来项目活跃度有所下降，Storm 已处于维护模式；同时指出，来自现有提交者之外的偶发缺陷报告、用户提问和拉取请求表明，该软件仍在使用之中。<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup>

项目并非一直处于这种状态。2023 年初，PMC 就曾多次讨论将 Storm 迁入 Apache Attic（归档）并退役，最终决定继续维护而非进入归档；后来在上一任主席不再活跃并拒绝迁入归档之后，PMC 选出了新主席。<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup> 此后社区进行了自我更新：Julien Nioche 和 Richard Zowalla 于 2023 年 8 月加入 PMC，Nikhil Singh 于 2023 年 10 月加入，Purshotam Shah 于 2024 年 10 月成为提交者、2025 年 5 月成为 PMC 成员。维护工作包括：升级大量第三方库以减少技术债务、放弃 Hive 支持、将 Java 运行时要求提高到 17、因缺乏社区参与而放弃 Calcite 支持、增加 mTLS 支持、把问题追踪从 Jira 迁移到 GitHub，以及 2026 年关于可持续性的讨论——PMC 坦言其活跃基本盘较小，活跃成员人数已接近发布与正式投票达到法定人数所需的三人下限。<sup>[7](https://www.apache.org/foundation/board/minutes/Storm.html)</sup>

Storm 以源码与二进制的 tar 包以及 zip 归档的形式分发，附带 OpenPGP 签名和 SHA-512 校验和，在 [Maven Central](https://www.edgepedia.org/zh/maven-central) 上以 org.apache.storm 作为 groupId 发布，并在 [Docker Hub](https://www.edgepedia.org/zh/docker-hub) 上提供官方 Docker 镜像。<sup>[21](https://storm.apache.org/downloads)</sup>

## References

1. [Apache Storm, project homepage, Apache Software Foundation](https://storm.apache.org/)
2. [Apache Storm: Free and open source](https://storm.apache.org/about/free-and-open-source.html)
3. [Apache Storm: Simple API](https://storm.apache.org/about/simple-api.html)
4. [Storm Tutorial, apache/storm documentation on GitHub](https://github.com/apache/storm/blob/master/docs/Tutorial.md)
5. [Apache Storm: Guarantees data processing](https://storm.apache.org/about/guarantees-data-processing.html)
6. [Apache Storm 3.1.0 Released, storm.apache.org announcement](https://storm.incubator.apache.org/2026/09/12/storm310-released.html)
7. [Board history: Storm, Apache Software Foundation](https://www.apache.org/foundation/board/minutes/Storm.html)
8. [Nathan Marz, "History of Apache Storm and lessons learned" (2014)](https://nathanmarz.com/blog/history-of-apache-storm-and-lessons-learned.html)
9. [Comparative Evaluation for the Performance of Big Stream Processing Systems, University of Tartu](https://dspace.ut.ee/server/api/core/bitstreams/930d2424-bea6-4d0c-b678-b932dff448e9/content)
10. [Guaranteeing Message Processing, Apache Storm 0.9.x/current release documentation](https://storm.apache.org/releases/current/Guaranteeing-message-processing.html)
11. [Guaranteeing message processing, Storm wiki](https://github-wiki-see.page/m/xumingming/storm/wiki/Guaranteeing-message-processing)
12. [High Availability on a Distributed Real Time Processing System, UC Berkeley EECS-2015-144](https://digicoll.lib.berkeley.edu/nanna/record/137958/files/EECS-2015-144.pdf?registerDownload=1&version=1&withMetadata=0&withWatermark=0)
13. [Apache Storm 3.0.0 Released, storm.apache.org announcement](https://storm.apache.org/2026/07/22/storm300-released.html)
14. [Releases, apache/storm on GitHub](https://github.com/apache/storm/releases)
15. [Sharma, R., & Jalota, C. (2022). An Empirical Evaluation of Real-Time Stream Processing Frameworks for Handling High Velocity Big Data, IJBIBDA 5(1)](https://research.tensorgate.org/index.php/IJBIBDA/article/view/77)
16. [Table I: Overview of the comparison between Stream Processing Systems, GTA/UFRJ technical report ALD16b](https://www.gta.ufrj.br/ftp/gta/TechReports/ALD16b.pdf)
17. [Evaluation Platforms: Apache Kafka and Storm, George Washington University (2019)](https://faculty.cs.gwu.edu/timwood/papers/19-lanman-serverless.pdf)
18. [Karimov et al., Benchmarking Distributed Stream Data Processing Systems, ICDE 2018](https://arxiv.org/abs/1802.08496)
19. [R-Storm: Resource-Aware Scheduling in Storm](https://arxiv.org/abs/1904.05456)
20. [When Two Choices Are not Enough: Balancing at Scale in Distributed Stream Processing](https://arxiv.org/abs/1510.05714)
21. [Apache Storm downloads](https://storm.apache.org/downloads)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Data mining, warehousing, and big data › Big data platforms and frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/apache-storm

English original: https://www.edgepedia.org/apache-storm
