# Redpanda

**Redpanda** 是一个用于事件流的流式数据平台，它在单个 C++ 二进制文件中重新实现了 [Apache Kafka](https://www.edgepedia.org/zh/apache-kafka) 的网络传输协议，因此为 Kafka 编写的应用程序只需更改连接设置而非代码即可在 Redpanda 上运行。该项目移除了 Kafka 对 JVM 和 ZooKeeper 的依赖，采用基于 Seastar 框架的每核一线程执行模型，并使用 Raft 共识算法协调复制。<sup>[1](https://github.com/redpanda-data/redpanda)</sup><sup> • </sup><sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一个兼容 Kafka API 的事件流平台，定位为 Apache Kafka 集群的替代品<sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup><sup> • </sup><sup>[3](https://www.factorhouse.io/resources/kafka/cloud-brokers/)</sup> |
| 实现 | 用 C++ 编写，通过 Seastar 库实现每核一线程设计；无 JVM，无 ZooKeeper<sup>[4](https://www.redpanda.com/guides/kafka-alternatives)</sup> |
| 共识 | Raft 协调集群节点间的日志写入与复制<sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup> |
| 客户端兼容性 | 使用 0.11 或更高版本协议的 Kafka 客户端只需极少改动或无需改动即可工作；已验证的客户端包括 Java 客户端、librdkafka、franz-go、Sarama、kafka-python 和 KafkaJS<sup>[5](https://docs.redpanda.com/streaming/current/develop/kafka-clients/)</sup> |
| 许可 | 社区版免费且源码可见，采用商业源代码许可证（BSL）；BSL 代码在每次合并四年后转为 Apache 2.0<sup>[6](https://docs.redpanda.com/streaming/23.3/get-started/licenses/)</sup> |
| 性能声明 | 厂商基准测试报告 p99.99 尾部延迟至少比 Kafka 3.2 快 10 倍，在 1 GB/s 工作负载下最高快 70 倍；对这些声明的独立测试有限<sup>[7](https://www.redpanda.com/blog/redpanda-vs-kafka-performance-benchmark)</sup><sup> • </sup><sup>[3](https://www.factorhouse.io/resources/kafka/cloud-brokers/)</sup> |
| 社区 | GitHub 仓库约有 12.6k 星标和 798 个复刻<sup>[1](https://github.com/redpanda-data/redpanda)</sup> |

## 用途与数据模型

Redpanda 为流式传输实时数据提供基础设施。生产者应用程序发送事件，Redpanda 按顺序持久存储这些事件，并将其组织为话题——系统中可重放的变更日志。消费者应用程序订阅话题并异步读取事件。这种解耦使生产者和消费者能以各自独立的速率运行，同时 Redpanda 保证已确认的写入是持久的，且可被多个消费者读取。<sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup><sup> • </sup><sup>[8](https://docs.redpanda.com/streaming/current/get-started/architecture/)</sup>

在其架构文档中，Redpanda 的核心被描述为一个用于存储事件流的容错事务日志。一个话题可以有多个生产者写入和多个消费者读取，即使少数节点发生故障，Raft 也能保持集群节点对变更的一致性。<sup>[8](https://docs.redpanda.com/streaming/current/get-started/architecture/)</sup><sup> • </sup><sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup>

## 架构与性能工程

**单一二进制，无 JVM。** Apache Kafka 是一个组件化系统，依赖独立的节点或二进制文件来提供 ZooKeeper 或 KRaft、JVM、模式注册表和 HTTP 代理。Redpanda 将代理、模式注册表、HTTP 代理和 Raft 共识打包在一个二进制文件中，无外部依赖。<sup>[9](https://www.redpanda.com/data-streaming/platform-capabilities)</sup> 该项目的工程师将 C++ 实现描述为其性能工作的基础：代码库使用线程局部数据结构，通过 libhwloc 将内存绑定到线程，并直接调用 Linux 层面的设施，包括用于数据包处理的 DPDK、用于异步磁盘 I/O 的 io_uring 以及用于文件系统访问的 [O_DIRECT](https://www.edgepedia.org/zh/o-direct)。<sup>[10](https://www.redpanda.com/blog/what-makes-redpanda-fast)</sup>

每核一线程模型为每个核心分配独立的工作，避免热路径中的跨线程协调。Redpanda 自己的指南将其相对于基于 JVM 的 Kafka 的尾部延迟优势归因于这种贴近内核的设计、线程绑定以及在多核和 NVMe 存储硬件上的直接内存管理。<sup>[4](https://www.redpanda.com/guides/kafka-alternatives)</sup>

## 基准测试与独立证据

该公司最著名的基准测试针对 Apache Kafka 3.2 运行，两个系统均配置为最大数据安全性，使用 [Linux 基金会](https://www.edgepedia.org/zh/linux-foundation)的 OpenMessaging Benchmark，报告了以下 p99.99 端到端延迟：<sup>[7](https://www.redpanda.com/blog/redpanda-vs-kafka-performance-benchmark)</sup>

| 工作负载 | Kafka p99.99 | Redpanda p99.99 | Redpanda 快多少 |
|---|---|---|---|
| 50 MB/s | 164.57 ms（3 节点） | 13.91 ms（3 节点） | 12 倍 |
| 500 MB/s | 388.66 ms（4 节点） | 16.658 ms（3 节点） | 23 倍 |
| 1 GB/s | 5509.73 ms（6 节点） | 79.574 ms（3 节点） | 70 倍 |

在同一测试中，Kafka 无法在 3 个节点上维持 1 GB/s 的工作负载，即使使用 9 个节点（Redpanda 硬件的 3 倍），其尾部延迟仍慢 7 倍。后续针对使用 KRaft 的 Kafka 的对比报告称，Redpanda 在 3 节点对 7 节点 Kafka 的情况下尾部快 20 倍，即使给 Kafka 额外 2 到 3 倍的硬件，尾部仍快 4 到 20 倍。<sup>[11](https://www.redpanda.com/blog/kafka-kraft-vs-redpanda-performance-2023)</sup>

这些数据来自厂商运行的测试，独立报道对此持谨慎态度。Factor House 关于云代理的一份资源明确指出，没有任何具有已发布方法的独立基准测试能解决性能问题，厂商的效率声明基于厂商自行配置的测试，公平的比较应运行自己的工作负载并与启用了分层存储的 Kafka 进行对比。<sup>[3](https://www.factorhouse.io/resources/kafka/cloud-brokers/)</sup> 2022 年的一篇学术论文同样指出，缺乏将 Redpanda 的容量与 Apache Kafka 进行比较的独立研究，尤其是在资源效率至关重要的物联网工作负载方面。<sup>[12](https://www.diva-portal.org/smash/get/diva2%3A1864143/FULLTEXT01.pdf)</sup> 一项数据摄取平台的比较研究发现，在其测量中 Redpanda 和 Kafka 的吞吐量几乎持平，而 RabbitMQ 在其小消息场景中以 490.5 条消息/秒表现最佳。<sup>[13](https://www.doria.fi/bitstream/handle/10024/192781/noman.pdf?sequence=2)</sup> 分布式系统测试公司 Jepsen 对 Redpanda 21.10.1 的分析考察了该平台的一致性声明；分析指出，厂商的“默认零数据丢失”表述与 Kafka 明确标注的其默认设置会降低性能的警告形成对比。<sup>[14](https://jepsen.io/analyses/redpanda-21.10.1.pdf)</sup>

## Kafka 兼容性及其局限

兼容性是该产品的核心设计决策。为 Kafka 协议 0.11 或更高版本开发的 Kafka 客户端只需极少改动或无需改动即可与 Redpanda 配合使用，Redpanda Data 未验证但使用 Kafka 协议的客户端在文档记录的限制范围内仍然兼容。Redpanda Data 使用 ducktape 和混沌测试套件验证了 Java 客户端以及广泛使用的 C/C++（librdkafka）、Go（franz-go、confluent-kafka-go、Sarama）、Python（kafka-python、confluent-kafka-python）、Rust（kafka-rust）和 Node.js（KafkaJS、confluent-kafka-javascript）客户端。<sup>[5](https://docs.redpanda.com/streaming/current/develop/kafka-clients/)</sup>

存在文档记录的例外。SASL 用户只能持有一种 SCRAM 机制，即 SCRAM-SHA-256 或 SCRAM-SHA-512，不能两者兼有。HTTP 代理（pandaproxy）不支持通过 REST 进行话题和 ACL 管理，仅支持生产和消费。不支持 Kafka 请求速率配额（request_percentage）；Redpanda 改为按用户、客户端或客户端组提供字节速率和 controller_mutation_rate 配额。Redpanda 未实现 KIP-890（事务服务端防御）的服务端部分，声称其事务实现不会受到该类复制特定错误的影响；Kafka 4.x 客户端会检测到这一点并回退到原始事务协议。<sup>[5](https://docs.redpanda.com/streaming/current/develop/kafka-clients/)</sup>

## 存储与平台功能

**分层存储**近乎实时地将日志段卸载到对象存储，并可按话题与本地存储结合使用，以实现长期保留和灾难恢复。文档将其描述为多层级对象存储解决方案，营销材料指出 S3 兼容的云存储可作为默认层级，从而以低成本实现长期保留。<sup>[8](https://docs.redpanda.com/streaming/current/get-started/architecture/)</sup><sup> • </sup><sup>[9](https://www.redpanda.com/data-streaming/platform-capabilities)</sup>

部署方式涵盖自托管裸机、容器、虚拟机、通过 Redpanda Operator 的 [Kubernetes](https://www.edgepedia.org/zh/kubernetes) 以及 Redpanda Cloud。运维工具包括用于管理集群、话题和数据的 rpk 命令行工具，以及用于设置和监控的 Redpanda Console。<sup>[2](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)</sup><sup> • </sup><sup>[15](https://docs.redpanda.com/streaming/current/home/)</sup> 配套产品 Redpanda Connect 提供数据集成连接器，用于在流式管道中在系统之间移动数据。<sup>[16](https://www.redpanda.com/connect)</sup>

## 许可与治理

Redpanda 社区版在 GitHub 仓库中免费且源码可见，采用 Redpanda 商业源代码许可证。适用两项限制：用户不能将 Redpanda 作为商业流式或队列服务提供给他人，BSL 代码在每次代码合并四年后转为 Apache 2.0 许可。Redpanda 企业版需要 Redpanda 社区许可证下的许可证密钥，并增加功能；该平台也以 Redpanda Cloud 形式提供，即完全托管服务。评论者指出，因此它严格来说并非开源，InfoWorld 的评论认为这一区别对自托管使用并不重要。<sup>[6](https://docs.redpanda.com/streaming/23.3/get-started/licenses/)</sup><sup> • </sup><sup>[17](https://go.redpanda.com/hubfs/PDFs/InfoWorld_on_Redpanda.pdf)</sup>

该平台背后的公司 Redpanda Data 由其首席执行官 Alex Gallego 创立。<sup>[18](https://www.redpanda.com/press)</sup>

## 发布节奏

Redpanda 遵循年度发布列车，而非单独的长期和短期支持分支。25.3 版本于 2025 年 11 月 19 日发布，自托管支持至 2026 年 11 月 19 日；26.1 版本于 2026 年 3 月 31 日发布，26.2 版本于 2026 年 7 月 28 日发布，自托管支持终止于 2027 年 7 月 28 日，云支持终止于 2027 年 4 月 28 日。厂商表示将继续评估 LTS/STS 模式是否有意义。<sup>[19](https://support.redpanda.com/hc/en-us/articles/20617574366743-Redpanda-Supported-Versions)</sup>

## References

1. [redpanda-data/redpanda, GitHub repository](https://github.com/redpanda-data/redpanda)
2. [Introduction to Redpanda, Redpanda Streaming documentation](https://docs.redpanda.com/streaming/current/get-started/intro-to-events/)
3. [Redpanda | Cloud brokers, Factor House](https://www.factorhouse.io/resources/kafka/cloud-brokers/)
4. [Apache Kafka alternatives in 2026: A comparison guide, Redpanda](https://www.redpanda.com/guides/kafka-alternatives)
5. [Kafka Compatibility, Redpanda Streaming documentation](https://docs.redpanda.com/streaming/current/develop/kafka-clients/)
6. [Redpanda Licensing, Redpanda Streaming documentation](https://docs.redpanda.com/streaming/23.3/get-started/licenses/)
7. [Redpanda vs. Kafka: A performance comparison, Redpanda blog](https://www.redpanda.com/blog/redpanda-vs-kafka-performance-benchmark)
8. [How Redpanda Works, Redpanda Streaming documentation](https://docs.redpanda.com/streaming/current/get-started/architecture/)
9. [Redpanda Data Streaming Features & Capabilities, Redpanda](https://www.redpanda.com/data-streaming/platform-capabilities)
10. [What makes Redpanda fast?, Redpanda blog](https://www.redpanda.com/blog/what-makes-redpanda-fast)
11. [Redpanda vs. Kafka with KRaft: Performance update, Redpanda blog](https://www.redpanda.com/blog/kafka-kraft-vs-redpanda-performance-2023)
12. [There is a lack of independent research (thesis, DiVA portal)](https://www.diva-portal.org/smash/get/diva2%3A1864143/FULLTEXT01.pdf)
13. [A Comparative Analysis of Modern Data Ingestion (thesis, Doria)](https://www.doria.fi/bitstream/handle/10024/192781/noman.pdf?sequence=2)
14. [Redpanda 21.10.1, Jepsen analysis](https://jepsen.io/analyses/redpanda-21.10.1.pdf)
15. [Redpanda Streaming Documentation](https://docs.redpanda.com/streaming/current/home/)
16. [Data Integration Platform & Connectors | Redpanda Connect](https://www.redpanda.com/connect)
17. [Review: Redpanda gives Kafka a run for its money, InfoWorld (PDF)](https://go.redpanda.com/hubfs/PDFs/InfoWorld_on_Redpanda.pdf)
18. [Press: Latest News, Press Kit, & More, Redpanda](https://www.redpanda.com/press)
19. [Redpanda Supported Versions, Redpanda support](https://support.redpanda.com/hc/en-us/articles/20617574366743-Redpanda-Supported-Versions)

---
*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/redpanda

English original: https://www.edgepedia.org/redpanda
