Show HN: 基于无状态 Broker 的、兼容 Kafka 的 S3 流式处理
1 分•作者: 2pk03•6 个月前
Hi HN,
KafScale 是一个与 Kafka 兼容的流处理系统,原生支持 Kubernetes,以 S3 作为事实来源,broker 不保存持久状态。它使用 Go 语言编写,运行在 Kubernetes 上。
在多年运维 Kafka 并遇到相同问题后,我们构建了它:broker 故障需要数小时才能恢复,分区重新平衡会阻塞部署,磁盘容量规划永无止境。
工作原理:
* 生产者和消费者使用标准的 Kafka 客户端
* Broker 在内存中缓冲数据,然后刷新到 S3
* etcd 存储元数据和消费者组状态
* 恢复意味着重启一个 pod 并从 S3 读取数据
* 可选的 Iceberg 处理器直接从 S3 读取数据段,完全绕过 broker,适用于批处理/分析型工作负载
您需要放弃的:延迟为 400-500 毫秒(S3 往返时间),不支持事务,不支持压缩主题。它并不能 100% 替代 Kafka。
您将获得的:broker 可随意丢弃,扩展只需增加副本数量,无需磁盘管理,通过 S3 ACL 直接访问流数据
许可证:Apache 2.0
GitHub: [https://github.com/novatechflow/kafscale](https://github.com/novatechflow/kafscale)
查看原文
Hi HN,<p>KafScale is Kafka-compatible streaming, k8s native, where S3 is the source of truth and brokers hold no persistent state. Written in Go, runs on Kubernetes.<p>Built this after years of operating Kafka and hitting the same walls: broker failures that take hours to recover, partition rebalancing that blocks deploys, disk capacity planning that never ends.<p>How it works:<p>- Producers and consumers use standard Kafka clients
- Brokers buffer in memory, flush to S3
- etcd stores metadata and consumer group state
- Recovery means restarting a pod and reading from S3
- Optional Iceberg processor reads segments directly from S3, bypasses brokers entirely for batch/analytical workloads<p>What you give up: latency is 400-500ms (S3 round-trip), no transactions, no compacted topics. It's not a 100% replacement.<p>What you get: brokers are disposable, scaling is just replica count, no disk management, direct access to streamed data over S3 ACL<p>License: Apache 2.0
GitHub: <a href="https://github.com/novatechflow/kafscale" rel="nofollow">https://github.com/novatechflow/kafscale</a>